Prandip
New User
Joined: 04 Mar 2005 Posts: 84 Location: In my tiny cubicle ...
|
|
|
|
Before you can ever sit down to create a job using JCL, you must know what program(s) you want to execute and what those programs require for input, output, messages, print, etc. Once you know this, you can create your job.
First, you must create the JOB statement. A JOB statement is required for each job. The JOB statement consists of the characters // in columns 1 and 2 and four fields: name, operation (JOB), parameter, and comments. The format of the JOB statement is:
| Code: |
//JOBNAME JOB (Accounting Information),'Programmer Name',parameters
|
The information required for the JOB statement is site-specific. Check with your local standards for requirements. Usually, the basic requirements will be:
| Code: |
//JOBNAME JOB (Acct Number,Acct Info),'Name',CLASS=initclass,MSGCLASS=msgclass,MSGLEVEL=(1,1)
|
For more details, check here: publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2B660/20.0?DT=20050713232151
Next, you must create an EXEC statement. Use the EXEC (execute) statement to identify the program or cataloged or in-stream procedure that this job step is to execute and to tell the system how to process the job step. The EXEC statement marks the beginning of each step in a job or a procedure.
A job can have a maximum of 255 job steps. This maximum includes all steps in any procedures the EXEC statements call.
The format of the EXEC statement is:
| Code: |
//[STEPNAME] EXEC positional-parm[,keyword-parm]...[,symbolic-parm=value]...
|
A stepname is optional. An EXEC statement must contain one of the positional parameters: PGM, PROC, or procedure name. The format of the EXEC statements may be one of the following:
| Code: |
//[STEPNAME] EXEC PGM=program,optional parameters
//[STEPNAME] EXEC PROC=procedure name,optional parameters
//[STEPNAME] EXEC procedure,optional parameters
|
For more details, check here: publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2B660/16.0?DT=20050713232151
The DD (Data Definition) statements are optional, and are only required as needed by the program being executed. The format of the DD statement is:
| Code: |
//[DDNAME] DD positional-parmeter,keyword parameter...
|
There are three position-parameters. * or DATA specifies the beginning of an in-stream dataset. DUMMY specifies no space allocation, no disposition processing and no I/O. There are way too many keyword parameters to list here. See here for more details: publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2B660/12.0?DT=20050713232151
These are the three major components of all JCL. If you can understand them, then you can understand JCL. Remember that JCL has been around for a very long time without many changes. The majority of parameters you may encounter in the manuals will most likely never be used in a modern batch environment. The advent of System Managed Storage (SMS) has taken away from the developer the burden of needing to calculate storage space for datasets. So, don't make the mistake that a lot of others have done and get bogged down in the details. Keep it simple!
For further reading:
|
|