IBM OS/390 ユーザーズマニュアル

ページ / 673
location for these. In OS/390 these duplicate names need to be resolved
somehow. Refer to Chapter 5, “Disk and Tape Storage Considerations” on
page 97.
4.3.10.9 Conditional JCL
VSE/ESA added conditional JCL processing in the early 1980s, with VSE/SP
Version 2. This conditional JCL is characterized by several new JCL statements,
including // IF, // GOTO, // ON, and /. LABEL statements which allow the user to
make JCL decisions based on the results of conditions set by previous JCL
statements and program executions during the job.
The // IF statement can test the value of the last return code, the maximum
return code found so far during this job, or the value of parameters. Based on
the test, the subsequent statement can be skipped or executed. The // GOTO
statement, in conjunction with the /. LABEL statement, allows steps or groups of
steps to be skipped. A // GOTO statement will only skip in the forward direction
-- looping is not allowed.
4.3.11 MVS Job Control Statements
4.3.11.1 DD Statement
The main JCL statement in MVS is the DD statement. It replaces the VSE JCL
TLBL, DLBL, ASSIGN, RESET and EXTENT statements. Because it replaces so
many JCL commands in VSE it can become complex. One complaint from VSE
users is a DD statement must be coded for every step of every job where a file
is used. If a change is made to a data set name, the JCL must be changed
everywhere the file is used. In VSE these labels may be located in Standard
Labels where they can be changed in one place.
4.3.11.2 OUTPUT JCL Statement
The OUTPUT JCL statement was added to JES in release 2.1.3. This replaces the
′/
*OUTPUT
′ 
JECL statement which provides various output attributes. With the
DEFAULT=YES
″ 
parameter, the OUTPUT JCL statement can provide step level
or job level default attributes, much like the JOBLIB, STEPLIB and STEPCAT
statements.
See 4.4, “JECL” on page 89 for more details.
4.3.11.3 MVS Conditional JCL
You can conditionally execute steps in a job by using the IF/THEN/ELSE/ENDIF
statement construct or the COND parameter.
IF THEN ELSE ENDIF Statements
Depending on the results of a job step, you might need to bypass or execute
later steps. For example, if a step terminates abnormally, you might want to
execute an error routine procedure; while if the step terminates normally, you
want to continue processing with the next step.
The conditions can be based on return codes, ABEND codes, or whether the job
step ran or not.
84
VSE to OS/390 Migration Workbook