MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

GDG - creation date of multiple generations using (0) (-1)

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
BobGilbert
Beginner


Joined: 12 Sep 2006
Posts: 24
Topics: 10

PostPosted: Tue Sep 23, 2014 3:01 pm    Post subject: GDG - creation date of multiple generations using (0) (-1) Reply with quote

I have looked around a bit and hitting walls or multiple steps, I see a long way to come up what I need but think there may be a better way.

I am trying to capture the dates of various versions of a GDG just using the base and (0) (-1) etc.

I can get this using IKJEFT01 (LISTDS 'name' HISTORY) but need to convert the (0) to the version number first.

I can use IEFBR!4 and read the sysout and create a control card but then I am adding steps.

Is there a way using IKJEFT01 I can get the creation date of any specific version of a GDG. I already figured out if you give the GDG base only you get the creation of the last version, but I need for example (-3) creation date or even -10....hope this makes since

Is there an easier way, Thanks!
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12368
Topics: 75
Location: San Jose

PostPosted: Tue Sep 23, 2014 3:28 pm    Post subject: Reply with quote

BobGilbert,

Use the following DFSORT JCL which will list all the gdg generations create date.

Code:

//STEP0100 EXEC PGM=IKJEFT01                                   
//SYSTSPRT DD DSN=&&L,                                         
//            DISP=(,PASS),                                     
//            SPACE=(CYL,(1,1),RLSE),                           
//            DCB=(LRECL=80,RECFM=FB,BLKSIZE=0)                 
//SYSTSIN  DD *                                                 
  LISTCAT ENT('YOUR.GDG.BASE.NAME') ALL
//*                                                             
//STEP0200 EXEC PGM=SORT                                       
//SYSOUT   DD SYSOUT=*                                         
//SORTIN   DD DSN=&&L,DISP=(OLD,PASS)                           
//SORTOUT  DD SYSOUT=*                                         
//SYSIN    DD *                                                 
  OPTION COPY                                                   
  INCLUDE COND=(01,8,CH,EQ,C'GDG BASE',OR,                     
                04,7,CH,EQ,C'NONVSAM',OR,                       
                37,8,CH,EQ,C'CREATION')                         
                                                               
  INREC IFTHEN=(WHEN=GROUP,RECORDS=2,PUSH=(81:17,44),           
      BEGIN=(1,8,CH,EQ,C'GDG BASE',OR,4,7,CH,EQ,C'NONVSAM')),   
  IFTHEN=(WHEN=(37,8,CH,EQ,C'CREATION'),                       
  OVERLAY=(53:53,8,UFF,M11,LENGTH=7,X))                         
                                                               
  OUTFIL INCLUDE=(37,8,CH,EQ,C'CREATION'),                     
  BUILD=(81,44,C' CREATED ON : ',53,7,Y4T,TOGREG=Y4T(-),80:X)   
//*

_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
BobGilbert
Beginner


Joined: 12 Sep 2006
Posts: 24
Topics: 10

PostPosted: Tue Sep 23, 2014 3:45 pm    Post subject: Reply with quote

Thank you, I saw the information in the tricks manual,

My issue I am having is in the middle of a proc. I have a symbolicly resolved dataset name with the version as a (0), (-3) etc...

The DFSORT gets them all. I need the specific one being read in the proc at the time. I had once thought I could just write all out with the syncsort and create a temporary lookup table and cound backwards (or soemthing like that) but again I am getting complicated.

There may not be any un complicated way?
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12368
Topics: 75
Location: San Jose

PostPosted: Tue Sep 23, 2014 4:31 pm    Post subject: Reply with quote

BobGilbert wrote:
Thank you, I saw the information in the tricks manual,

My issue I am having is in the middle of a proc. I have a symbolicly resolved dataset name with the version as a (0), (-3) etc...

The DFSORT gets them all. I need the specific one being read in the proc at the time. I had once thought I could just write all out with the syncsort and create a temporary lookup table and cound backwards (or soemthing like that) but again I am getting complicated.

There may not be any un complicated way?


Bob Gilbert,

It is quite simple to accommodate that. Pass the gdg base name in IGDG and generation number as a max of 4 bytes in IGEN ie. '+0', '-3' , '-21', or '-256'

Code:

// SET IGDG='Your.GDG.Base'                                         
// SET IGEN='-3'                 
//*                                     
//STEP0100 EXEC PGM=IKJEFT01,PARM='LISTCAT ENT(''&IGDG'') ALL'         
//SYSTSPRT DD DSN=&&L,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE),             
//            DCB=(LRECL=80,RECFM=FB,BLKSIZE=0)                       
//SYSTSIN  DD DUMMY                                                   
//*                                                                   
//STEP0200 EXEC PGM=SORT,PARM='JP1"&IGEN"'                             
//SYSOUT   DD SYSOUT=*                                                 
//SYMNOUT  DD SYSOUT=*                                                 
//SORTIN   DD DSN=&&L,DISP=(OLD,PASS)                                 
//SORTOUT  DD SYSOUT=*                                                 
//SYSIN    DD *                                                       
  INCLUDE COND=(01,8,CH,EQ,C'GDG BASE',OR,                             
                04,7,CH,EQ,C'NONVSAM',OR,                             
                37,8,CH,EQ,C'CREATION')                               
                                                                       
  INREC IFTHEN=(WHEN=GROUP,RECORDS=2,PUSH=(81:17,44),                 
      BEGIN=(1,8,CH,EQ,C'GDG BASE',OR,4,7,CH,EQ,C'NONVSAM')),         
  IFTHEN=(WHEN=(37,8,CH,EQ,C'CREATION'),                               
  OVERLAY=(53:53,8,UFF,M11,LENGTH=7,X))           
                     
  SORT FIELDS=(81,44,CH,D),EQUALS                                     
                                                                       
  OUTREC IFTHEN=(WHEN=GROUP,KEYBEGIN=(81,44),PUSH=(135:ID=3)),         
  IFTHEN=(WHEN=INIT,OVERLAY=(135:135,3,ZD,SUB,+1,M11,LENGTH=3,         
                             140:JP1,6X,140:140,8,UFF,M11,LENGTH=3,5X))
                                                                       
  OUTFIL INCLUDE=(37,8,CH,EQ,C'CREATION',AND,(135,3,CH,EQ,140,3,CH)), 
  BUILD=(81,44,C' CREATED ON : ',53,7,Y4T,TOGREG=Y4T(-),80:X)
//*

_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
BobGilbert
Beginner


Joined: 12 Sep 2006
Posts: 24
Topics: 10

PostPosted: Wed Sep 24, 2014 12:32 pm    Post subject: Reply with quote

Thank you very much! One step and I can add the version as another parm, which I had intended to do anyhow!
Back to top
View user's profile Send private message Send e-mail
CraigG
Intermediate


Joined: 02 May 2007
Posts: 202
Topics: 0
Location: Viginia, USA

PostPosted: Wed Sep 24, 2014 2:27 pm    Post subject: Reply with quote

BobGilbert wrote:
Thank you very much! One step and I can add the version as another parm, which I had intended to do anyhow!


You had better learn the difference between versions and generations!!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group