View previous topic :: View next topic
|
Author |
Message |
bhagyac
New User
Joined: 17 Apr 2008 Posts: 44 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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, 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: 8797 Location: Welsh Wales
|
|
|
|
Can I ask why you would want to do this ? |
|
Back to top |
|
|
bhagyac
New User
Joined: 17 Apr 2008 Posts: 44 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
New User
Joined: 14 Jul 2006 Posts: 93 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 |
|
|
|