View previous topic :: View next topic
|
Author |
Message |
prabhu v
New User
Joined: 03 Feb 2008 Posts: 5 Location: mumbai
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
prabhu v
New User
Joined: 03 Feb 2008 Posts: 5 Location: mumbai
|
|
|
|
Hi superk,
I have done the exact 3 steps that you have mentioned...
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 |
|
|
Douglas Wilder
Active User
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
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 |
|
|
prabhu v
New User
Joined: 03 Feb 2008 Posts: 5 Location: mumbai
|
|
|
|
hi Douglas,
Thanks for the help. It worked
~ prabhu |
|
Back to top |
|
|
|