Understanding completion codes for EXEC-Initiated EXECs with WAIT(YES) and User-Written programs

Both EXEC-initiated EXECs with WAIT(YES) and user-written programs gain control of the thread while the execution of the initiating EXEC is suspended.

When the execution of the initiating EXEC is resumed the initiating EXEC can determine the success of the called EXEC or program by testing the BBI variables IMFCC and IMFRC.

If IMFCC is zero, meaning the EXEC (with the WAIT(YES) parameter) or user-written program was successfully scheduled, a separate local variable, IMFRC, will be set with the return code from the program or EXEC. A selected EXEC with WAIT(YES) can return this value by using the EXIT command. See EXIT. For example:

IMFEXEC EXIT CODE(12)

causes IMFRC to be set to 12 when the calling EXEC receives control.

The following values of IMFCC are valid for SELECTed EXECs and programs:

Value

Description

00

program or EXEC scheduled

08

program or EXEC not found

20

severe error

This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

Comments