JCL Tutorial
 

Index

  1. HOME
  2. JOB STATEMENT
  3. EXEC STATEMENT
  4. JOBLIB / STEPLIB
  5. DD STATEMENTS
  6. JOB & EXEC PARAMETER
  7. INSTREAM & CATALOG PROC
  8. GENERATION DATA GROUP
  9. CONTROL JOB PROCESSING
  10. RESTART AND CHECK POINT
  11. JCL UTILITIES

link to web design guide
Provided by the web design companies online directory.

 

Introduction

Job Control Language (JCL) is used to tell the system what program to execute, followed by a description of program inputs and outputs. It is possible to submit JCL for batch processing or start a JCL procedure (PROC), which is considered a started task. The details of JCL can be complicated but the general concepts are quite simple. Also, a small subset of JCL accounts for at least 90% of what is actually used. This section discusses selected JCL options.

While application programmers need some knowledge of JCL, the production control analyst responsible must be highly proficient with JCL, to create, monitor, correct and rerun the company's daily batch workload.

There are three basic JCL statements:

vJOB Provides a name (jobname) to the system for this batch workload. It can optionally include accounting information and a few job-wide parameters.

vEXEC Provides the name of a program to execute. There can be multiple EXEC statements in a job. Each EXEC statement within the same job is a job step.

vDD The Data Definition provides inputs and outputs to the execution program on the EXEC statement. This statement links a data set or other I/O device or function to a ddname coded in the program. DD statements are associated with a particular job step.

Example.

//MYJOBJOB 1

//MYSORTEXEC PGM=SORT

//SORTINDD DISP=SHR,DSN=ZPROF.AREA.CODES

//SORTOUTDD SYSOUT=*

//SYSOUTDD SYSOUT=*

//SYSINDD *

SORT FIELDS=(1,3,CH,A)

/*

In Interacting with z/OS, we executed the same routine from the TSO READY prompt. Each JCL DD statement is equivalent to the TSO ALLOCATE command. Both are used to associate a z/OS data set with a ddname, which is recognized by the program as an input or output. The difference in method of execution is that TSO executes the sort in the foreground while JCL is used to execute the sort in the background.

When submitted for execution:

vMYJOB Is a jobname the system associates with this workload.

vMYSORT Is the stepname, which instructs the system to execute the SORT program.

vSORTIN On the DD statement, this is the ddname. The SORTIN ddname is coded in the SORT program as a program input. The data set name (DSN) on this DD statement is ZPROF .AREA.CODES. The data set can be shared (DISP=SHR) with other system processes. The data content of ZPROF .AREA.CODES is SORT program input.

vSORTOUT This ddname is the SORT program output.

vSYSOUT SYSOUT=* specifies to send system output messages to the Job Entry Subsystem (JES) print output area. It is possible to send the output to a data set.

vSYSIN DD * is another input statement. It specifies that what follows is data or control statements. In this case, it is the sort instruction telling the SORT program which fields of the SORTIN data records are to be sorted.

We use JCL statements in this text; some z/OS users use the older term JCL card, even though JCL resides in storage rather than punched cards.