View previous topic :: View next topic
Author
Message
sravindra_s New User Joined: 29 Nov 2005Posts: 8
Hi,
I am facing a issue when deleting all versions of GDG and trying to create an empty Version.
Code:
PS010 EXEC PGM=SORT
SYSPRINT DD SYSOUT=*
SYSOUT DD SYSOUT=*
SYSUDUMP DD SYSOUT=*
SORTIN DD DSN=XXXX(0),DISP=SHR
SORTOUT DD DSN=XXXX.TEMP,
DISP=(NEW,CATLG,DELETE),
SPACE=(CYL,(200,100),RLSE),
VOL=(,,,99),
RECFM=FB,LRECL=7030,DSORG=PS
SYSIN DD DSN=&CCARD..CCARD(SRTCPY),
DISP=SHR
//**********************************************************************
//* PS020: DELETE ALL GENRATIONS OF XXXX FILE
//**********************************************************************
//PS020 EXEC PGM=IEFBR14
//DD01 DD DSN=XXXX,
// DISP=(MOD,DELETE,DELETE),
// SPACE=(TRK,(1,1),RLSE)
//*
//**********************************************************************
//* PS030: COPY TEMP FILE to XXXX +1
//**********************************************************************
//*
//PS030 EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SORTIN DD DSN=TEMP,DISP=SHR
//SORTOUT DD DSN=XXXX(+1),
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(200,100),RLSE),
// VOL=(,,,99),
// RECFM=FB,LRECL=7030,DSORG=PS
//SYSIN DD DSN=&CCARD..CCARD(SRTCPY),
// DISP=SHR
It is executing successfully. But it is creating XXXX.G0005V00 version directly instead of creating XXXX.G0001V00
Please let me know how to rectify this.
Advance thanks.
Back to top
Pandora-Box Global Moderator Joined: 07 Sep 2006Posts: 1592 Location: Andromeda Galaxy
You need to understand the difference between generation and version
Back to top
expat Global Moderator Joined: 14 Mar 2007Posts: 8797 Location: Welsh Wales
Have you tried a job break after the delete step. i.e. a NEW job to create the +1 GENERATION
I think you will find that the catalog entry for the current GENERATION will be kept until EOJ.
Remember, when you create a +1 within a job, it will always be referred to as +1 until the creating job has ended.
Back to top
boyti ko New User Joined: 03 Nov 2014Posts: 78 Location: Malaysia
Im also curious on this one and have tried it. Expat is correct, so in your case, you'll be able to meet your expectation if you run your step PS030 in a separate job.
Back to top
Nic Clouston Global Moderator Joined: 10 May 2007Posts: 2455 Location: Hampshire, UK
Please use the code tags.After 11 years you should know how, and when, to use them.
Coded for you.
Back to top
Rohit Umarjikar Global Moderator Joined: 21 Sep 2010Posts: 3048 Location: NYC,USA
Back to top
Please enable JavaScript!