Return to Statement


Compile, Link, or Run Example

This example demonstrates the use of the BATCH statement to compile three GRIP programs.

$$
$$ Declarations
$$
NUMBER/NUM(3)
$$
$$ Statement
$$
NUM=BATCH/COMPIL,'PGM1','PGM2','PGM3'

The array NUM will be assigned the three batch job numbers, referred to as a BID numbers which identify the compilation of the three corresponding programs (PGM1, PGM2, PGM3). These numbers may be used later for cancelling the job or for obtaining the job status.

Example 2

This example demonstrates the use of the OS,'osfilespec' option with the BATCH command for better error trapping of os errors.

   STEP1: FDEL / 'BOGUS.GRS', IFERR, STEP2:
STEP2: BATCH / COMPIL, 'BOGUS.GRS', OS, 'ZCOMP.OUT'
HALT