Previous Topic Next topic Print topic


cobrun Command

Restriction: This command is supported for native COBOL only.

The name of this command varies depending on the platform: for Windows platforms, use the run command; for UNIX/Linux platforms, use the cobrun command.

To run dynamically loadable programs (that is, callable shared objects, or .int or .gnt files) use the following command(s):

Windows:

run [(switch-params)] program-name [program-params]

UNIX/Linux:

cobrun [switch-params] program-name [program-params]
Note: For multi-threaded programs, use cobrun_t instead (UNIX/Linux platforms only).

where:

switch-params
One or more programmable and run-time switches that control events in a program at run time. On Windows platforms, enclose all switches in parentheses. Your application supplier will tell you which switches to specify.
program-name
The name of a dynamically loadable program.
If you do not specify an explicit filename extension in the run (Windows) cobrun (UNIX) command, and multiple versions exist, then by default:
  • The callable shared object version is run in preference to the .gnt file.
  • The .gnt file is run in preference to the .int file.

If program-name does not contain an explicit path, the directories specified by $COBPATH, and in the case of a callable shared object, the directories specified by $LD_LIBRARY_PATH, or $LIBPATH, are searched.

program-params
One or more parameters that are required by the program. Each parameter is a string, separated from adjoining parameters by one or more spaces.

If any of the parameters contain an equal sign, the equal sign is mapped to parentheses as these have a special meaning to UNIX, whereas the equal sign does not. These parameters can be read by the program in a number of ways.

Comments:

UNIX only: Use cobrun in conjunction with the effective working mode to run in a 32-bit or 64-bit environment; alternatively, use cobrun32 or cobrun64 to directly invoke those environments.

Previous Topic Next topic Print topic