Joined: 04 Mar 2005 Posts: 85 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:
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.
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!