|
View previous topic :: View next topic
|
| Author |
Message |
nandakumar Warnings : 2 New User
Joined: 05 May 2005 Posts: 50
|
|
|
|
| How to copy the content of gdg to a ps file,when the gdg limit is reached? |
|
| Back to top |
|
 |
superk
Global Moderator

Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
| 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 |
|
 |
MGIndaco
Active User

Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
|
|
|
|
| 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 |
|
 |
nandakumar Warnings : 2 New User
Joined: 05 May 2005 Posts: 50
|
|
|
|
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 |
|
 |
MGIndaco
Active User

Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
|
|
|
|
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 |
|
 |
superk
Global Moderator

Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
 |
die7nadal
Active User
Joined: 23 Mar 2005 Posts: 156
|
|
|
|
| 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 |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|