|
|
| Author |
Message |
bhagyac
New User
Joined: 17 Apr 2008 Posts: 6 Location: bangalore
|
|
|
|
Hi,
I want to Print the Last GDG version created. For Eg. if i have
AAA.BBB.CCC.v001
AAA.BBB.CCC.v002
AAA.BBB.CCC.v003
.
.
AAA.BBB.CCC.v0014
I want to print the latest GDG name(AAA.BBB.CCC.v0014) in the spool, indicating that, that is the last one available.
Can any one help me in this, how to get that.
Thank you. |
|
| Back to top |
|
 |
References
|
Posted: Fri Apr 18, 2008 3:23 pm Post subject: Re: Print the last GDG name created. |
 |
|
|
 |
Moved: Fri Apr 18, 2008 4:24 pm by superk From JCL to SMS & VSAM |
superk
Moderator Team Head
Joined: 26 Apr 2004 Posts: 3094 Location: Charlotte,NC USA
|
|
|
|
| Use IDCAMS LISTCAT to create the list of entries, and SORT to select the last entry from the list. |
|
| Back to top |
|
 |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 2952 Location: Brussels once more ...
|
|
|
|
| Can I ask why you would want to do this ? |
|
| Back to top |
|
 |
bhagyac
New User
Joined: 17 Apr 2008 Posts: 6 Location: bangalore
|
|
|
|
Hi,
Thanks for your information. Let me try out with that.
Hi Expat,
Here is the reason why i need that...
A job takes a GDG version as input. When it fails, i want to get that GDG generation name, (for which the has failed) in the report.
Thank you. |
|
| Back to top |
|
 |
skkp2006
Active User
Joined: 14 Jul 2006 Posts: 64 Location: Chennai,India
|
|
|
|
Bhagya,
Try the following jcl for your requirement and go by what Kevin has mentioned.
| Code: |
//*HOW TO GET THE LAST GDG VERSION
//STEP10 EXEC PGM=IDCAMS
//DD1 DD DSN=YOUR.GDG.TOTEST(+0),DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
PRINT INFILE(DD1) COUNT(0) CHAR
/*
// |
Syam |
|
| Back to top |
|
 |
|
|