Previous Topic: ALLOC()Next Topic: BOOLWORD()


BATCHRC()

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

Syntax

value = BATCHRC([number])

Parameters

value

Value that is 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

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