JCL Query- Urgent.

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

pratik Ranjan
Member
Posts: 21
Joined: Wed Jan 21, 2009 2:21 pm
Location: Hyderabad

JCL Query- Urgent.

Post by pratik Ranjan » Wed Jan 21, 2009 2:39 pm

Hi All,

Actually I have a set of 12 jcls with me. All the jcls are using some common symbolic parameters, but the values of the paramters will change based on the execution date(still it has to be the same for all the jobs) . All the jobs have to run in sequence i.e. one after the other as they have dependencies on the previous one. So i have embedded the IKJEFT01 steps at the last of each jcl, which will invoke the next job.
Now actually before invoking the execution procedure of all the jobs, everytime i am supposed to change the values of the same parameters in all the jcls, and then start the execution. This is a repetitive task actually. So if someone could tell me please, is there any way so that i can copy all the symbolic parameter override statements somewhere and include it in all the jcls, so that supplying all the values at once will serve the purpose...maybe something like Copybook in COBOL.

Thanks in advance...

Pratik Ranjan.

User avatar
Natarajan
Moderator
Posts: 537
Joined: Fri Oct 10, 2008 12:57 pm
Location: chennai
Contact:

Post by Natarajan » Wed Jan 21, 2009 4:55 pm

As per my knowledge, i dont think, jcl can read the symbolic parameters from outside.

Tell me - where you are using these symbolic parameters?

to send data to program?
Natarajan
Chennai

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Wed Jan 21, 2009 5:20 pm

obviously you do not have a scheduler.

How is the IKJEF pgm, at the end of each job, submitting the next job?
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

pratik Ranjan
Member
Posts: 21
Joined: Wed Jan 21, 2009 2:21 pm
Location: Hyderabad

Post by pratik Ranjan » Wed Jan 21, 2009 5:23 pm

Hi Natarajan,

Actually the symbolics are used in input and output DD statements of all the Jcls. All the I/O dataset names actually contains Execution date and other details which are common across all the Jobs. That's why i thought, if i could find anything like Copybook in JCL, then it would be easy for me to change the symbolics in only one place which will be in effect reflected across all the Jcls.

Thanks.
Pratik Ranjan.

pratik Ranjan
Member
Posts: 21
Joined: Wed Jan 21, 2009 2:21 pm
Location: Hyderabad

Post by pratik Ranjan » Wed Jan 21, 2009 5:41 pm

Actually i have simply added the step for submitting next job to the end of each job as shown below.

//EXECUTE EXEC PGM=IKJEFT01,COND=(0,NE)
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
SUB 'IBMPTDV.TWE.JCL(WH02STKH)'
/*

This submits the next job 'WH02STKH' automatically.
Pratik Ranjan.

User avatar
Natarajan
Moderator
Posts: 537
Joined: Fri Oct 10, 2008 12:57 pm
Location: chennai
Contact:

Post by Natarajan » Wed Jan 21, 2009 5:49 pm

i can suggest to write a program to rewrite the jcl before submitting it. As per my knowledge, there is no existing tool available to do this.
Natarajan
Chennai

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Wed Jan 21, 2009 7:06 pm

you are already using IKJEFT.., write a REXX script to modifiy the JCL (your symbolic substitution values) and then sub the modified jcl thru the rexx.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Thu Jan 22, 2009 11:13 am

Hi,

Can you please show how you are using your symbolics & to what do you change them?
Regards,
Anuj

pratik Ranjan
Member
Posts: 21
Joined: Wed Jan 21, 2009 2:21 pm
Location: Hyderabad

Post by pratik Ranjan » Fri Jan 23, 2009 2:53 pm

Hi Anuj,

Actually in all the JCLs, So many Symbolics are used, but i am just giving one example below.

JCL1:
//JOB CARD
// SET DATASET1='PRATIK.DATA1.090123',DATE=090123
.
.
.
//DD1 DD DSN=&DATASET1.,DISP=...
//DD2 DD DSN=IBMPTDV.D&DATE.,DISP=NEW...
.
.
.
---------------------------------------------------
JCL2:
//JOB CARD
// SET DATASET1='PRATIK.DATA.090123',DATE=090123
.
.
.
//INDATA1 DD DSN=&DATASET1.,DISP=...
//INDATA2 DD DSN=IBMPTDV.D&DATE.,DISP=....
//OUTDATA DD DSN=IBMPTDV.OUTPUT.D&DATE,DISP=NEW...
.
.
---------------------------------------------------------------------------------------------

And similar types are used in all other JCls also. So i just wanted keep all the 'SET' Statements in a dataset and get it copied in all the JCls, so that changing the value at one place will serve the purpose.

Thanks.
Pratik Ranjan.

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Sun Feb 01, 2009 12:23 pm

Hi,

May be you can write all the "SET" statements in a member of some PDS & then include that PDS in all the JCLs.
Regards,
Anuj

pratik Ranjan
Member
Posts: 21
Joined: Wed Jan 21, 2009 2:21 pm
Location: Hyderabad

Post by pratik Ranjan » Tue Feb 03, 2009 5:27 pm

Hi Anuj,

That's exactly what i want to do. But could you please suggest, how we can include a PDS in a JCL, because i am not aware of any such option in a JCL.

Thanks.
Pratik Ranjan.

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Wed Feb 04, 2009 11:33 am

Hi,

I'm not very sure about your situation yet, however, may be you can try someting like this:

On PROC EXEC level, define something like, say Datalib:

Code: Select all

//Procname PROC 
//             DATALB='Pratik.PROD.DATALIB'
and in the "body" of every PROC, code something like:

Code: Select all

//include    DD  DSN=&DATALB(member) 
You may have differnt SET-varaibles in differnt members, but once they are "included" in all the PROCs, later you just need to change members & all the PROCs will have those changes.

Hope this helps...
Regards,
Anuj

pratik Ranjan
Member
Posts: 21
Joined: Wed Jan 21, 2009 2:21 pm
Location: Hyderabad

Post by pratik Ranjan » Thu Feb 05, 2009 6:02 pm

Thanks very much Anuj...I was not aware of the INCLUDE option in JCLs. I thought that, the INCLUDE option is valid only in case of SORT utility.
Pratik Ranjan.

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Thu Feb 05, 2009 6:17 pm

Hi,

In my last post "include" was just other DD name, please don't consider it as "reserved keyword" - it was used only for representational purpose.
Regards,
Anuj

User avatar
Natarajan
Moderator
Posts: 537
Joined: Fri Oct 10, 2008 12:57 pm
Location: chennai
Contact:

INCLUDE IN JCL

Post by Natarajan » Thu Feb 05, 2009 6:34 pm

INCLUDE keyword in jcl used as follows...

Code: Select all

//STEP1 EXEC PGM=COBOL1  
//STEPLIB  INCLUDE MEMBER=pdsmembername          

it will include the member from the pds's.
Natarajan
Chennai

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others