Compile Rules can be configured in Preference Pages,see below.
A Compile rule consists of the following parts:
Compile Rule Name | The name of the rule. Names need not be unique, but it is recommended to use the same name only for rules with disjunctive source patterns (e.g. one for single files, the other for library elements). The name of the rule will be listed in the sub-menu of the context menu Remote Compile With. |
---|---|
Source File Type | Specifies whether this rule is to be applied to Simple files, PLAM library elements, or to All files. If All files is specified the rule is applied in any case, whether a simple file or a library element is selected. |
Source Pattern | Specifies a pattern for the source file or library element path. Paths of simple files match the general pattern :cat:$user.filename ,paths of library elements of the *HIGHEST-EXISTING version match the general pattern
:cat:$user.libname/type/element ,and paths of library elements of other versions match the general pattern :cat:$user.libname/type/element()/element(version) .Wildcards ( * ) and herewith user-defined placeholders of the form
&{placeholder-name} are allowed in patterns. A placeholder
behaves like a wildcard, but during pattern matching with a source path the matching substring
is assigned to this placeholder.Source pattern not specifying a cat ID and/or user ID and not beginning with a wildcard or a placeholder are implicitly prefixed with :*: or :*:$*. , resp.Note that using more than one placeholder may lead to ambiguous assignment. Sample 1: The file name :cid:$uid.pre1.prog1.cbl matches the source pattern
:*:$*.&{prefix}.&{program}.CBL and defines the placeholder &{prefix} with value pre1 and
&{program} with value prog1 .Sample 2: The source pattern * matches all file names. With this source pattern the compile rule
can be applied to all file names.For further examples of source patterns see screenshot above. Source files must not be ISAM files. |
Listing Expression | Specifies where the invoked compiler will generate the listing.
This expression can contain placeholders previously defined in the
Source Pattern as well as some generic placeholders derived from
the matching source file or library element, see Generic Placeholders. The button Add Placeholders... provides a convenient method to insert available placeholders in listing expressions. For examples of listing expressions see screenshot above. Listing files must not be stored on private disks. |
Placeholder Set | From the dropdown box you can choose one of the predefined Placeholder Sets. The placeholder defined in this set can be used in the Compile Command |
Compile Command | Specifies the compile command (by its Command Name)
to be executed when this rule is active. The compile command may refer to the placeholders
defined in the Source Pattern or to generic placeholders or to placeholders
defined in the selected Placeholder Set. Several rules can specify the same compile command. Thus you can assign a first compile command cmd1 to a first set of libraries (e.g. *.lib1/s/*
and *.lib2/s/* , each having its own Compile rule but specifying the
same Command name cmd1) and second compile command cmd2 to another set
of libraries (e.g. *.lib3/s/ and *.lib4/s/* specifying cmd2 as compile command).A convenient way to edit the compile command associated with a selected compile rule is to press the Edit Command button. |
Output files expressions | Specifies where the invoked compiler will generate the output file(s) that will
be downloaded after compilation. After compilation, BS2IDE will search for defined Delegate Rules that matched
provided Output file expression in given project and replace it's content with the remote file from BS2000 host. This expression can contain placeholders previously defined in the Source Pattern as well as some generic placeholders derived from the matching source file or library element, see Generic Placeholders.
Defining Output file expression is similar to the listing expression. |
A convenient way to open the listing file generated by a remote compilation is the context menu BS2000 > Open Remote Listing File of the source file, or just press Ctrl+Alt+L.
Furthermore you can open the Remote BS2000 Compilations view via Window > Show View > Other... > BS2000 > Remote BS2000 Compilations. If an entry in this view is selected (by clicking on its Date/Time field) the view menu provides Open Listing File and Show Console Output. The console output is only available during the current Eclipse session, it is not persistently saved.