Definition of the program to run.
The name section is user-defined, for giving more verbal name to the program.
Parameters:
PGM (name of the load module)
PARM (value directly sent to the program; the program receives it by using the ACCEPT clause; maximum 100 characters; optional)
COND (classic conditional run, nowaday it is rare; optional)
PROC (procedure call, DD override, parameter override)
The compiler places the compiled program called load module into a LOADLIB library (sometimes it is called MODLIB by developers). Such library is practically a PDS or PDS(E) file, and the members are the executable modules. The LOADLIB member names are maximum 8 character long, so is the value of the PGM parameter. The LOADLIB containing the program defined in PGM value must be pointed in a DD statement (see it there).
The PARM key is standard, the COBOL program will use is as well when receiving its value. Properties:
the value is always text-like with single apostrophes
receive it in COBOL via the USING clause of the PROCEDURE DIVISION along with LINKAGE SECTION definition (modern COBOL)
receive it in COBOL via using the ACCEPT <text variable> FROM PARM sentence (old COBOL)
in case of more data should be given, use composite value (e.g. "value1|value2", "value1 value2", "A=12, B=9")
in case of composite value, divide the content in COBOL with UNSTRING, INSPECT, MOVE ...(n:m), FUNCTION TRIM, FUNCTION NUMVAL
See the COBOL PROCEDURE DIVISION, COBOL OPERATORS, COBOL FUNCTIONS, COBOL VARIABLES pages.
Although the PARM value can be 100-character long, the whole line can not be longer than 72 characters. In case longer value or originally multiple-line version is necessary, use:
in-stream DD (SYSIN DD *)
read the data from a dataset (DD DSN=,DISP=SHR)
See the JCL DD STATEMENTS for more.
COND value:
4,LT (if the previous RC < 4, this EXEC will be skipped)
EXAMPLE FOR EXEC STATEMENT: