IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How JCL is created ?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Pradeepshan

New User


Joined: 20 Jan 2006
Posts: 6
Location: bangalore

PostPosted: Fri Jan 20, 2006 10:39 pm
Reply with quote

Can any one clearly tell me the steps involved in creating the JCL program ? i am just learning Mainframes.please do give an example to explain JOB, EXEC and DD statement types.
Back to top
View user's profile Send private message
Prandip

New User


Joined: 04 Mar 2005
Posts: 84
Location: In my tiny cubicle ...

PostPosted: Sat Jan 21, 2006 2:32 am
Reply with quote

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:

Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to read unpacked field created in... DFSORT/ICETOOL 12
No new posts REXX identify the last/latest created... CLIST & REXX 7
No new posts Include a member getting created with... JCL & VSAM 5
No new posts Not able to PuT message in Newly crea... Java & MQSeries 1
No new posts EZACFSM1 created file name - passing ... JCL & VSAM 23
Search our Forums:

Back to Top