Defining Compile Commands

To tell BS2IDE how to compile a source file with a BS2000 compiler we must provide a BS2000 command, which can also be a /CALL-PROCEDURE command. To be able to interpret the listing generated by the compiler and to set problem markers on the source file, BS2IDE must also know where to find the generated listing. Both can be configured in Preference Pages, see below.

Preference Page

To define compile commands open command link Window > Preferences > BS2000 Remote IDE > Remote Compilation. Here is the default contents of the Remote Compilation preference page:

Compile commands

In the upper half of the Remote Compilation preference page you define Compile commands. You can add new commands by clicking Add Command, edit a selected command by clicking Edit Command, or deleting a selected command by clicking Delete Command. For the sake of convenience, if a Compile command is selected when Add Command is clicked, the selected command is shown as initial value in the the dialog box which is opened to enter the new command.

The commands are either single BS2000 commands or a sequence of commands and statements. In the dialog box opened to enter or edit the commands, each command and statement should be specified in a separate line. The commands and statements are then implicitly concatenated with ";" as delimiter. Note, each command must be preceded by "/" and each statement must be preceded by "//".

The length of the entire command string is limited to about 400 characters after replacement of placeholders. Thus, in most cases the command will just be /CALL-PROCEDURE delegating the work to a command procedure located on the BS2000 system (the command procedure is best edited with the SDF Procedure Editor provided by BS2IDE, see Program source files). Furthermore, command and operand names should be abbreviated to reduce the risk of exceeding the length limit.

However, the command must neither be /ENTER-JOB nor /ENTER-PROCEDURE as BS2IDE expects compilation to be finished and listing file to be generated when the command returns.

The command will be executed by openFT's ftexec which internally assigns SYSOUT to a temporary file being transferred to the client and shown in the Console view (to be opened via command link Window > Show View > Other... > General > Console). Thus, neither the command sequence nor the probably called command procedure should contain /ASSIGN-SYSOUT commands, including ASSIGN-SYSOUT *PRIMARY. Otherwise the contents of the Console view may be incomplete.

Commands and statements can refer to placeholders in the form &{placeholder-name}. Referenced paceholders must either be defined in the Compile rule or must be generic, see Defining Compile Rules and Generic Placeholders.

There can be more than one Compile command for the same compiler. They can differ in compile options (e.g. optimizing, non-optimizing, prepared for debugging), the source locations (e.g. simple files or library elements, files of own user ID or shared files of foreign user IDs), or any other customized behavior. Compile commands must have a unique name to be referenced in Compile rules.

For a compile command you can customize the Exit Codes in the Create/Edit Compile Command page. With the Edit Exit Codes button you can specify

Together with the exit code this message is shown in the State and Exit Code column of the Remote BS2000 Compilation view. Usually a compilation should be considered successful even if it has reported syntax errors. Error messages found in the listing file will be converted to problem markers anyway.