Previous Topic: ALLOC()

Next Topic: BOOLWORD()

BATCHRC()

In batch mode (under SRVBATCH), the BATCHRC() function allows an IMOD to set or reset the value that is returned to the operating system as the JOBSTEP completion code. This value may be tested in the job's JCL to permit conditional execution of further steps.

Syntax

The BATCHRC() function has this syntax:

value = BATCHRC([number])

Arguments

The BATCHRC() function takes these arguments:

value

Value that is currently set as the JOBSTEP completion code.

number

Value that replaces any former value and returns to the system as the JOBSTEP completion code.

Default: The existing value is returned but is not changed.

Usage Note

BATCHRC() is valid only when the IMOD is executing in batch mode, under SRVBATCH.

Return Codes

The BATCHRC() function produces these return codes:

101

ARG 1 MISSING OR INVALID

Example

/* Set a return code only if RC is higher than the current 
   return code */

   newret = batchrc(max(rc,batchrc()))
   if newret > 8 then exit