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?
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.
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.
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.