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

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


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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

Global Moderator


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

PostPosted: Wed Feb 06, 2008 6:00 pm
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to display the leading zeros of a... DB2 7
No new posts SDSF display Max-RC in different colors TSO/ISPF 4
No new posts How to read unpacked field created in... DFSORT/ICETOOL 12
No new posts Converting a file from PD to display ... SYNCSORT 4
No new posts Unable to display comp variable COBOL Programming 4
Search our Forums:

Back to Top