Reusable JCL collection
Previous topic | Next topic | Contents | Glossary | Contact z/OS | PDF


JCL EXEC statements: Positional and frequently used parameters

Reusable JCL collection

In addition to the two positional parameters (PGM and PROC), the EXEC statement also may contain about a dozen keyword parameters. But you'll most often use only this handful.

Positional parameters

An EXEC statement must contain one of these positional parameters: PGM, PROC, or procedure name.
PGM
The PGM parameter identifies the program the system is to run.

z/OS® includes a number of programs, called utilities, which are useful in batch processing. These programs provide many small, obvious, and useful functions. For example, z/OS has a utility program named IEBGENER to copy data.

Customer sites often add their own customer-written utility programs (although most users refrain from naming them utilities) and many of these are widely shared by the user community. Independent software vendors also provide many similar products (for a fee).

PROC or procedure name
The PROC parameter or procedure name identifies the cataloged or in-stream procedure the system is to run.
If you omit the PGM or PROC parameter, z/OS automatically assumes that you are specifying a procedure that you want to run.
The following code illustrates the three ways to correctly code this positional parameter.
//STEP1 EXEC PGM=program-name
//STEP1 EXEC PROC=procedure-name
//STEP1 EXEC procedure-name 
Lowercase text is variable text that you provide. You may code only one of these formats on a single EXEC statement.

Keyword parameters

In addition to the positional parameter indicating the program or procedure to run, the EXEC statement also may contain keyword parameters. If you code one of these keyword parameters on the EXEC statement, the keyword parameter value will apply only to that step. You are most likely to use only these few EXEC keywords:
COND
In a multi-step job, use the COND parameter to specify the conditions that allow the system to bypass a step by testing return codes from any or all previous steps. You can code up to eight comparisons. If any comparison is true, the system bypasses the step.

As an alternative, you may use the IF/THEN/ELSE statement, which you might find easier to code than COND parameter conditions.

PARM
Use the PARM parameter to pass variable information to the processing program executed by this job step. To use the information, the processing program must contain instructions to retrieve the information.
REGION
Use the REGION parameter to override the default amount of storage space (in kilobytes or megabytes) that the system allocates to a particular job or job step.

You may code the REGION parameter on the JOB statement and the EXEC statement. If REGION appears on both statements, the value on the JOB statement overrides that on the EXEC statement.





Copyright IBM Corporation 1990, 2010