Previous Topic Next topic Print topic


CBL_CANCEL

Cancels a COBOL program.

Syntax:

call "CBL_CANCEL"  using by value     flags
                         by reference program-name
                            returning status-code

Parameters:

  Using call prototype (see Key) Picture
flags cblt-x4-comp5250 pic x(4) comp-5
program-name pic x(n) pic x(n)
status-code See Library Routines - Key  

On Entry:

flags
The type of cancel behavior required. You can set the following bits:
Bit pair 0/1 (value 1/2)
logical/physical flags
00 Perform the default CANCEL behavior
01 Physically cancel the program
10 Logically cancel the program if possible, otherwise physically cancel it.
11 Reserved. Must not be used.
Bit 2 (value 4)
Reserved. Must not be used.
Bit 3 (value 8)
Prevent .dll code and shared object code from being physically canceled as part of a logical cancel operation.
0 Physically cancel .dll code and shared object code as part of a logical cancel operation
1 Do not physically cancel .dll code and shared object code as part of a logical cancel operation
program-name
The space- or null-terminated name of the program you want to cancel. The name can contain spaces as long as it starts with a double quote character (").

On Exit:

None.

Comments:

This routine provides finer run-time control of program cancelation than the COBOL CANCEL statement. It always returns zero, whether or not it was successful.

Any imported .dll files are automatically removed from memory when the .dll file which imports them is cancelled.

Previous Topic Next topic Print topic