The delegate must either be an existing file or library element of contents type text (see BS2000 file and library element content types), or it will be automatically created when needed. A delegate can be defined for each individual file, or via generic rules. If a delegate has been defined, remote compilation can be invoked.
For defining delegates see
For remote compilation of local source files compile commands and compile rules are applied on the delegate (see Defining Compile Commands and Defining Compile Rules) similar to the remote compilation within the remote resources (see Starting Remote Compilation).
For treating single sources, open the context menu BS2000. There you find the following actions for compiling:
Transfer local file to BS2000 Delegate File | Ctrl + Alt + T |
---|---|
Open Remote Listing File | Ctrl + Alt + L |
Assign Remote Build Rule | ► |
Remote Compile With (Temporarily) | ► |
Compile with last temporary compile rule | Ctrl + Shift + C |
You first need to transfer the source file to the BS2000 delegate file with BS2000 > Transfer local file to BS2000 Delegate File or Ctrl+Alt+T.
Secondary sources like C/C++ header files or COBOL copy books are usually not compilable by their own. They need, however, also be transferred to a delegate on the BS2000 system to allow its inclusion during compilation of primary sources. Non-compilable secondary sources can be transfered to their delegates via the context menu BS2000 > Transfer Local File to BS2000 Delegate File or CTRL+ALT+T. For transferring files to BS2000 multiple selection is possible as well. In addition when selecting a container or a project all included files are transferred.
Note that for treating single sources you must make sure that all other local resources needed for compilation (like procedure files called in compiling rules) are transferred to their BS2000 delegate files.
Then you can compile the source file with BS2000 > Remote Compile With (Temporarily) and choose one of the compile rules offered in the sub menu. Also you can compile the source file via BS2000 > Compile with last temporary compile rule. The file will be compiled using last used temporary rule or assigned compile rule (if not available). These actions don't change the default rule for the resource. Compilation with last used temporary compile rule can be done on multiple files, so you can choose more than one file in Project Explorer and select from context menu BS2000 > Compile with last temporary compile rule or use shortcut.
As usual, problem marker decorations are also set in the project view to indicate which remote resources have errors or warnings. Note, however, problem marker decorations are only set for those remote resources which have been manually re-compiled. There is no Auto Build automatically performing remote compilation on remote resources. If the listing could not be interpreted, you can open the corresponding listing file with the context menu BS2000 > Open Remote Listing File or by pressing Ctrl+Alt+L.
Before building a project make sure that a default compile rule is assigned for every source to be compiled. This can be done via the context menu BS2000 > Assign Remote Build Rule. For this multiple selection is possible as well. This default build rule is valid within this project and, if it is a compile rule, also for the BS2000 Explorer view.
Within a BS2000 Remote Build Project you should prefer Project > Build All or Ctrl+B or Project > Build Project to build the project rather than compiling individual sources (see Incremental Project Builder).
Should the context menu BS2000 not be available in your specific project view try the general Project Explorer or Navigator view.
In the Project View nodes for files with an individually defined delegate association
are decorated in the left top corner with
.
Furthermore, the delegate of a file is displayed in brackets behind the file name, e.g.
[-> /$userid/prefix.main.c]
or [-> /$userid:catid/prefix.main.c]
if different pubset than default has been chosen.
Generic rules are stored as persistent properties. They can be removed via context menu BS2000 > Remove BS2000 Delegate File Property or redefined via BS2000 > Define BS2000 Delegate File Property.
To define a generic rule proceed as follows:
Rule name | How delegates are generated by this rule | Sample delegate for project/src/main.c |
---|---|---|
Simple Flat |
The container relative path of each local file within the selected container (project or sub-folder)
is flattened (by replacing '/' by '.' and removing blanks) and prefixed with the name of the container. Optionally you can specify an additional File prefix which will be prepended with '.' as separator. You can also specify a comma separated list of extensions which will be removed to build the delegate file name. This rule could easily lead to file names exceeding the BS2000 file name length limit, thus use it with care. |
prefix.project.src.main.c |
Simple Flat (without project path) |
The simple path of each local file within the selected container (project or sub-folder). Optionally you can specify an additional File prefix which will be prepended with '.' as separator. You can also specify a comma separated list of extensions which will be removed to build the delegate file name. You have to take care that this rule don't create the same delegate for different files. |
prefix.main.c |
PLAM library |
For the selected container a PLAM library is created. The delegate is than an
element with the flattened container relative path as name. By default the name of the PLAM library is the name of the selected container. However, you can specify your own name as Library name. Optionally you can specify an additional Library name prefix. You can also specify a comma separated list of extensions which will be removed to build the delegate file name. By default the element type is S, but you can specify another Element type. |
prefix.project/s/src.main.c
|
Folder PLAM library |
For the container relative path of the directory immediately containing the local file
a PLAM library is created. The delegate is than an element with the
same name as the local file. Optionally you can specify a Library name prefix. You can also specify a comma separated list of extensions which will be removed to build the delegate file name. By default the element type is S, but you can specify another Element type. |
prefix.project.src/s/main.c
|
Ignore inheritance | Excludes this file or folder from inheriting, see Excluding individual files or folders below. | |
<No delegate rule> | Removes the rule. |
Containers in the Project View for which generic delegate rules are defined are decorated
in the left top corner with .
Folders and files below this container are decorated with
symbolizing
that the generic rule is inherited and active for them. Furthermore, the delegate path of each file is displayed
in brackets behind the file name, e.g. [-> /$userid:2os6/prefix.project.src/s/main.c]
.
Should the path of an inherited delegate be invalid, e.g. since it exceeds file name length limitations on BS2000,
the decoration would be changed to .
When Remote Compile or Transfer Local File to BS2000 Delegate File is invoked for a local file for which an inherited delegate rule is active, the remote delegate file or library element specified by this rule will be created on the connected BS2000 system, if it does not yet exist.
If an inherited delegate rule specifies an already existing file or library element on BS2000,
it will be used and overwritten by the transfer of the local file's contents to its
delegate without further notice. Thus, to avoid accidental overwrites, it is highly recommended to specify a unique prefix with the generic delegation rule, especially with Simple Flat rules. |
Below you can find example of defined 3 different project file versions using simple PLAM Library delegate rule:
File source.c(100) will be uploaded to PLAM element source.c file at version 100.
Second file source.c(101) will work in the same way but will transfer file at version 101.
The last file source.c - without provided version in its name - will transfer the file to as currently highest existing:
You can also combine element versions in delegate rules with comma separated list of extensions which will be removed during the build:
In the example the delegate rule has specified to remove c extension and version in file file name is moved before its extension. Such file will be transferred as source at version 100. Extension will be ignored but it will be possible to easy work with Eclipse file association based on file extension in BS2000 Remote Build Project.
Decoration | Meaning |
---|---|
Individual delegate defined for that file | |
Generic delegate rule defined for that folder | |
Inherited delegate rule active for that file or folder | |
File excluded from inheriting a generic delegate rule, does not have a delegate | |
Invalid delegate path resulting from inherited delegate rule |