Creates a synchronous or asynchronous run unit.
call "CBL_EXEC_RUN_UNIT" using command-line by value command-line-len by reference run unit-id by value stack-size flags returning status-code
Using call prototype (see Library Routines - Key) | Picture (32-bit systems) | |
---|---|---|
command-line | pic x(n). | pic x(n). |
command-line-len | cblt-os-size. | pic x(4) comp-5. |
run unit-id | cblt-x8-comp5. | pic x(8) comp-5. Must be level 01. |
stack-size | cblt-os-size. | pic x(4) comp-5. |
flags | cblt-os-flags. | pic x(4) comp-5. |
status-code | See Library Routines - Key |
command-line | The command passed to the new run unit. This should be the program-name followed by any parameters. | ||||||||||||||||||||||
line-length | The length of the command line. | ||||||||||||||||||||||
stack-size | This parameter is ignored. | ||||||||||||||||||||||
flags | A 32-bit word indicating how the new run unit is created as follows:
|
run unit-id | If bit 0 of flags is not set, the unique handle identifying the new run-unit. If bit 0 of flags is set, this value is unchanged. | ||||||||
status-code | Status of operation:
|
The run unit that makes the call is known as the parent, while the run unit created is known as the child. When the child is created it inherits certain attributes from its parent. The attributes inherited by the child are copies of the attributes in the parent at the exact time of the call; any changes made to the attributes of the parent after the call are not reflected in the child's attributes. Similarly, any changes made to the child's attributes are not reflected in the parent's attributes.
Bit 1 flag controls which attributes of the parent are inherited by the child.
The set of run units containing the initial run unit and all run units created from it is known as the coru.
You should be aware of the following when using run units: