Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
regarding gdg

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
nandakumar
Warnings : 2

New User


Joined: 05 May 2005
Posts: 50

PostPosted: Wed Jul 06, 2005 5:39 pm    Post subject: regarding gdg
Reply with quote

How to copy the content of gdg to a ps file,when the gdg limit is reached?
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Wed Jul 06, 2005 6:40 pm    Post subject: Re: regarding gdg
Reply with quote

A specific Generation Data Group dataset is already a PS dataset, so I'm not sure what you are looking for in the first part of your question. The second part is more confusing. What limit are you referring to, and what criteria are you using to determine when it has been reached?
Back to top
View user's profile Send private message
MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Wed Jul 06, 2005 8:47 pm    Post subject:
Reply with quote

I assume that you want to store a group of gdg level(or only the First) in another sequential dataset or gdg. Is it true?
Back to top
View user's profile Send private message
nandakumar
Warnings : 2

New User


Joined: 05 May 2005
Posts: 50

PostPosted: Thu Jul 07, 2005 8:54 am    Post subject: regarding gdg
Reply with quote

hi,
i give you one example so that u can understand what iam asking.

define gdg(name(tech010.joseph.gdg1)
limit(2)-
no empty-
scratch

when the limit is reached,the oldest generation will be deleted.

for example:
my first generation is : tech010.joseph.gdg1.g0001v00
my second generation is : tech010.joseph.gdg1.g0002v00

when 3rd dataset of gdg is generated that is: tech010.joseph.gdg1.g0003v00 according to the example given above.

The oldest two generation wil be deleted.

i want to copy the content of oldest two generations to a same ps file every time before they are deleted,once the limit has been reached.
Back to top
View user's profile Send private message
MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Thu Jul 07, 2005 12:37 pm    Post subject:
Reply with quote

First: gdg version are created from 1 to n(Limit) and not from 0.
Second: When third level is created, you want to catalog it as 1 or as 3?
Third: You want to delete or copy the previous 2 levels?

Quote:
a)The oldest two generation wil be deletd.

b) i want to copy the content of oldest two generations to a same ps file every time before they are deleted,once the limit has been reached.

c) copy and after delete the oldest?
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Thu Jul 07, 2005 6:02 pm    Post subject: Re: regarding gdg
Reply with quote

I'm guessing that this is what you are looking to do:

Code:

//*                                                 
//STEP0001 EXEC PGM=IDCAMS                           
//SYSPRINT DD   DSN=&&T1,DISP=(,PASS),UNIT=VIO       
//SYSIN    DD   *                                   
  LISTCAT LVL(HLQ.MY.GDG) ALL                   
/*                                                   
//*                                                 
//STEP0002 EXEC PGM=ICETOOL                             
//T1       DD   DSN=&&T1,DISP=(OLD,DELETE)               
//T2       DD   DSN=&&T2,DISP=(NEW,DELETE),UNIT=VIO     
//DFSMSG   DD   SYSOUT=*                                 
//TOOLMSG  DD   SYSOUT=*                                 
//TOOLIN   DD   *                                       
 COPY FROM(T1) TO(T2) USING(ICE1)                       
 COUNT FROM(T2) NOTEQUAL(2)                             
/*                                                       
//ICE1CNTL DD   *                                       
  OUTFIL FNAMES=T2,INCLUDE=(6,7,CH,EQ,C'NONVSAM'),       
    CONVERT,OUTREC=(22,44,80:X)                         
/*                                                       
//*                                                     
// IF (STEP0002.RC = 0) THEN                                   
//STEP0003 EXEC PGM=ICETOOL                                   
//IN1      DD   DSN=HLQ.MY.GDG(-1),DISP=(SHR,DELETE,KEEP)
//IN2      DD   DSN=HLQ.MY.GDG(-0),DISP=(SHR,DELETE,KEEP)
//OUT      DD   DSN=HLQ.COMB,DISP=(MOD,CATLG,DELETE),
//         UNIT=SYSDA,SPACE=(CYL,(1,1),RLSE)                   
//DFSMSG   DD   SYSOUT=*                                       
//TOOLMSG  DD   SYSOUT=*                                       
//TOOLIN   DD   *                                             
 COPY FROM(IN1) TO(OUT)                                       
 COPY FROM(IN2) TO(OUT)                                       
/*                                                             
// ENDIF                                                       
//*


where:

STEP0001 uses IDCAMS LISTCAT to list all of the generations for the indicated GDG base.

STEP0002 looks for the LISTCAT entries that say 'NONVSAM', and stores those dataset names in T2. Then, T2 is counted to see if there are two generations present.

STEP0003 runs only when STEP0002 determines that two generations already exist, and creates the backup to the sequential dataset.
Back to top
View user's profile Send private message
die7nadal

Active User


Joined: 23 Mar 2005
Posts: 156

PostPosted: Thu Jul 07, 2005 10:38 pm    Post subject: Re: regarding gdg
Reply with quote

Quote:
i want to copy the content of oldest two generations to a same ps file every time before they are deleted,once the limit has been reached.


I am assuming that you need a backup of the GDGs in a PS as and when they are scratched, I have also assumed that you would be appending the Step to the Job that creates the GDG, or else you can run this step as a separate Job but the SYSUT1 GDG should be (0) and this JOb should be run when ever the Job creating the GDG runs.

Code:
//STEP3   EXEC PGM=IEBGENER           
//SYSPRINT DD SYSOUT=*               
//SYSIN    DD DUMMY                   
//SYSUT1   DD DSN=MNT7.VA.GDG.#2(+1),
//            DISP=SHR               
//SYSUT2   DD DSN=MNT7.VA.#1,         
//            DISP=(MOD,CATLG,DELETE)
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:


Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us