Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to display the GDG gen created in the same JCL?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
prabhu v

New User


Joined: 03 Feb 2008
Posts: 5
Location: mumbai

PostPosted: Wed Feb 06, 2008 5:49 pm    Post subject: How to display the GDG gen created in the same JCL?
Reply with quote

I have a job which creates around 5 GDGs. After the run of this job I need the created GDG names including the generation number to be printed in the spool.

Note: Only the name of the GDG and not the content.

For ex:
The GDG base is COT.D88.TRANSTM and COT.D88.TRANSTM(+1) is being generated in the JCL.

COT.D88.TRANSTM.G0000V00
COT.D88.TRANSTM.G0001V00
COT.D88.TRANSTM.G0002V00
COT.D88.TRANSTM.G0003V00 = = > generated by the JCL

i have tried using :

//DEFALIAS EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
LISTC ENT(‘COT.D88.TRANSTM’)
/*

But by doing so,I get all the generations that exist for the GDG base in the spool. And according to my requirement I just need to print COT.D88.TRANSTM.G0003V00, which is generated by the JCL.

I understand that the generated version of the GDGs can be accessed in the JESYSMSG of the JCL (under the corresponding Step).

But is there a way of listing all the created GDG names under a single DD in the spool.

Thanks,
~Prabhu
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Wed Feb 06, 2008 6:00 pm    Post subject: Reply to: How to display the GDG gen created in the same JCL
Reply with quote

A couple of thoughts:

1. At the start of the job, run the LISTCAT step to get a list of all the generations BEFORE you create any new ones.

2. At the end of the job, run the LISTCAT step again to get a list of all the generations as they NOW exist.

3. Run the two lists through a SORT step, eliminating the duplicate names, and you'll have left only the names of the new generations.

<< OR >>

1. If you can use REXX, the LISTDSI function will give you the dataset name associated to a specific DD. You can find an example of such a code here.
Back to top
View user's profile Send private message
prabhu v

New User


Joined: 03 Feb 2008
Posts: 5
Location: mumbai

PostPosted: Wed Feb 06, 2008 6:51 pm    Post subject: Reply to: How to display the GDG gen created in the same JCL
Reply with quote

Hi superk,

I have done the exact 3 steps that you have mentioned... icon_biggrin.gif

But the point is, i will just be extending the steps by 3 for every created GDG, which will just add up to the LOC and make the JCL more complex.

So i was hoping if i could club all the generated GDG names togther.

No, i am not allowed to use REXX as this is a client requirement.

Anyways, thanks for the help. Do let me know if something pops up.

Thanks,
~ Prabhu
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Wed Feb 06, 2008 9:56 pm    Post subject:
Reply with quote

I do it like this:
Code:
//STEP10  EXEC PGM=IDCAMS                                     
//DD1       DD DSN=HLQ.JOB.STEP06.DSN1(+1),DISP=SHR     
//DD2       DD DSN=HLQ.JOB.STEP30.DSN2(+1),DISP=SHR
//DD3       DD DSN=HLQ.JOB.STEP30.DSN3(+1),DISP=SHR
//SYSPRINT  DD SYSOUT=K                           
//SYSIN     DD *                                             
 PRINT INFILE(DD1) COUNT(0) CHAR                             
 PRINT INFILE(DD2) COUNT(0) CHAR                             
 PRINT INFILE(DD3) COUNT(0) CHAR                             
/*                                                           
Back to top
View user's profile Send private message
prabhu v

New User


Joined: 03 Feb 2008
Posts: 5
Location: mumbai

PostPosted: Thu Feb 07, 2008 10:03 am    Post subject: Reply to: How to display the GDG gen created in the same JCL
Reply with quote

hi Douglas,

Thanks for the help. It worked icon_biggrin.gif

~ prabhu
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Display FTP Session Count within TSO Yolanda Harvey TSO/ISPF 3 Fri Mar 10, 2017 10:31 pm
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts Display ZEDLMSG without Pressing F1 &... anandgbe CLIST & REXX 8 Thu Dec 15, 2016 4:20 pm
No new posts How to display value of an exit param... lind sh CICS 2 Sun Oct 09, 2016 12:28 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us