Remote Command Procedure Call

Calling procedures

Files or library elements of type J may contain command procedures. These procedures can be called by selecting the file or library element and executing the context menu action Remote Procedure Call With.

The sub-menu action Default call command for library elements is available for library elements of type J and performs the default command /CALL-PROC FROM-FILE=*LIB-ELEM(...).

The sub-menu action Default call command for simple files is available for simple files and performs the default command /CALL-PROC FROM-FILE=....

The /CALL command and the SYSOUT of the called procedure is logged to the command link Console view.

Call Procedure With Parameters

Files and all type library elements can be called using Call Procedure With Parameters context menu action (or CTRL + SHIFT + P keyboard shortcut when file is selected):
contex menu action

The action displays pop-up where procedure parameters can be provided:
Remote call procedure with parameters dialog

It performs the command /CALL-PROC FROM-FILE=... PROCEDURE-PARAMETERS=(...) in the BS2000Terminal. Only one procedure can be running at the time. Terminal disconnects automatically, when the procedure ends.

Typical usage

SDF procedures can be provided to build an entire product. For instance, they can recompile all sources belonging to the product, preferably make controlled so that only the modified sources are recompiled. They can also bind the generated LLM modules and do other work required to complete the build.

Furthermore procedures can be provided to run tests.

Defining customized procedure calls

In addition to the predefined default procedure calls customized call commands can be defined. This is done similarly to the definition of compile commands and compile rules, see Defining Compile Commands and Defining Compile Rules. To define customized procedure call commands open command link Window > Preferences > BS2000 Remote IDE > RemoteProcedure Call. Here is the default contents of the Remote Procedure Call preference page:

For a call command you can customize the Exit Codes in the Create/Edit Call Procedure 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 Procedure Calls view.

When the execution of a call command fails, in the Problems View a quick fix is available to add the received exit code to the list of Success Exit codes.