IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Faccing issues while creating a GDG Version !!!!


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sravindra_s

New User


Joined: 29 Nov 2005
Posts: 8

PostPosted: Thu Jun 23, 2016 11:26 am
Reply with quote

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
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Thu Jun 23, 2016 11:48 am
Reply with quote

You need to understand the difference between generation and version
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jun 23, 2016 12:21 pm
Reply with quote

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
View user's profile Send private message
boyti ko

New User


Joined: 03 Nov 2014
Posts: 78
Location: Malaysia

PostPosted: Thu Jun 23, 2016 2:59 pm
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Thu Jun 23, 2016 3:07 pm
Reply with quote

Please use the code tags.After 11 years you should know how, and when, to use them.
Coded for you.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Thu Jun 23, 2016 6:07 pm
Reply with quote

Deleting and uncatloging GDG
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts Creating Unix Directory using COBOL i... COBOL Programming 2
No new posts Creating Report using SORT DFSORT/ICETOOL 7
No new posts Issues with VIEW DATASET Command CLIST & REXX 2
No new posts How to copy the -1 version of a membe... TSO/ISPF 4
Search our Forums:

Back to Top