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 

Problems with GDG

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
arun.chand
Beginner


Joined: 28 Jun 2005
Posts: 4
Topics: 4

PostPosted: Thu Jul 13, 2006 4:48 am    Post subject: Problems with GDG Reply with quote

Hi All,

I have a requirement. I have an GDG input coming from a job. In my job one of the steps will delete all the versions of this GDG and subsequrnt steps will create an empty version of GDG file. For example, if GDG version coming to my job is G0005V00, I will delete all the five versions and create an empty version.

Problem here is since I have both the steps in the same job, even if I delete all the 5 steps, the empty version getting created is G0006V00 and not G0001V00. So next day the input coming to my job will be G0007V00. If I delete it the version created will be G0008V00. I want the first version to be created after deleting everytime. That is when I delete G0005V00, I want G0001V00 to be created as empty version. What will I do here.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Thu Jul 13, 2006 7:06 am    Post subject: Reply with quote

arun.chand,

That should never happen. How are you deleting the GDG versions and creating the empty gen? Are you creating the empty before the delete step or after the delete step.

If you follow this sequence your GDG gen will start from gen1
Code:

//STEP0100 EXEC PGM=SORT                               
//SYSOUT   DD SYSOUT=*                                 
//SORTIN   DD DSN=YOUR GDG BASE,                   
//            DISP=(OLD,DELETE,KEEP)                   
//SORTOUT  DD DUMMY                                   
//SYSIN    DD *                                       
 SORT FIELDS=COPY                                     
//*                                                   
//STEP0200 EXEC PGM=IEFBR14                           
//FILE01   DD DSN=YOUR GDG BASE(+1),               
//            DISP=(NEW,CATLG,DELETE),                 
//            UNIT=SYSDA,                               
//            SPACE=(TRK,(1,1),RLSE),                 
//            DCB=(LRECL=NNN,RECFM=FB,BLKSIZE=0)       
//*                                                   


Hope this helps...

Cheers

Kolusu
_________________
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
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) 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