RETPD Parameters in DASD File



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

RETPD Parameters in DASD File

Postby samb01 » Tue Oct 01, 2019 6:32 pm

I would like to create Backup with PGM=ADRDSSU.
I'd like to use a DASD file (not tape because the backup is very small et it's every day. So i would like to save tape file by using DASD File).
With the tape fil, we used RETPD parameters, and CA1 managed it.
But with DASD file, CA1 can not managed the file beaucause it's not tape.

Si i have to create a daily JCL (by TWS) to delete the DASD File whne they will be expired.

I have two options :

1) Using IDCAMS with mask option


DELETE  YYY*.Y*.D*.T*.D*.A*
 


By running it every day, it will delete expired dataset btu not the unexpired one
i will have theis message for the unexpired one :
IDC3023I UNEXPIRED PURGE DATE
IDC3009I ** VSAM CATALOG RETURN CODE IS 84 - REASON CODE IS IGG0CLFM-0


But i will have many error messages like that. And surly, there is a IDCAMS limit for the number of file to delete....


2) The other option is Using ADRDSSU to delete file

By using Create date.

But to do this i have to put the Retpd parameters in the DSname file for example, if RETPD=45,
my file will be called :


YYY2018.YZAE.D2019.T1101.D204.RET45
 


to delete those file, i will use


BY((CREDT,LE,*,-45)
 


I would like to have your advices about using the fisrt or second way to make it.

Thnk's for your help (and sorry for my english...)
samb01
 
Posts: 405
Joined: Mon Nov 16, 2009 7:24 pm
Has thanked: 1 time
Been thanked: 0 time

Re: RETPD Parameters in DASD File

 

Re: RETPD Parameters in DASD File

Postby steve-myers » Tue Oct 01, 2019 7:24 pm

The use of EXPDT or RETPD for disk data sets (not files) is discouraged in most mainframe shops. It really does not work the way most people seem to expect and it creates major storage management problems as it interferes with most normal storage management procedures.

Similarly, placing dates into data set names is also, usually, a poor idea. The mainframe has had, for more than 50 years, the concept of Generation Data Groups. For the most part this is far superior to placing dates into data set names, a *nix idea that is used because *nix does not have the concept of Generation Data Groups. Your out dated backups will automatically be deleted if they are created in a Generation Data Group; you don't have to do anything other than defining the Generation Data Group index properly. See this IBM article.

I use ADRDSSU so infrequently (on the order of less than once a decade) that I cannot comment on your using it to delete data sets by their creation date idea. I think I can guarantee it will not work if it is combined with expiration dates.
steve-myers
Global moderator
 
Posts: 2078
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 235 times

Re: RETPD Parameters in DASD File

Postby NicC » Tue Oct 01, 2019 7:48 pm

Further to Steve's reply: use ADRDSSU to do the dump. Dump to a GDG. Create the GDG without a RETPD but set your GDG up to hold at least 45 generations. Place those GDGs wherever your storage management group says. After that it is all automatic.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3007
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: RETPD Parameters in DASD File

Postby willy jensen » Wed Oct 02, 2019 1:32 am

I too would prefer the GDG solution, though the ADRDSSU should work. Just keep in mind that if you run 2 backup jobs in one day then 2 GDS are created, so you must have exess number of entries in the GDG. Or make sure that you delete the newest created GDS if you have to rerun the job.
Whatever you do, forget the RETPD for dasd datasets.
You could of course set up a SMS management class, but that would be overkill.
willy jensen
 
Posts: 307
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 42 times

Re: RETPD Parameters in DASD File

Postby samb01 » Wed Oct 02, 2019 11:54 am

Hello and thank's for your advices.
But RETPD=45 is an example. Moste of ou batch's production the RETPD=400

I know GDG but the maximum limit is 255. So for a 400 days retention is too low...and as you said, Willy Jensen, il the bacth runs twice a day, GDG can't be the solution...
samb01
 
Posts: 405
Joined: Mon Nov 16, 2009 7:24 pm
Has thanked: 1 time
Been thanked: 0 time

Re: RETPD Parameters in DASD File

Postby willy jensen » Wed Oct 02, 2019 1:11 pm

Please clarify. You want to have your backup job handled the ame way as the production jobs? Do they create dasd datasets?, in which case I will assume a SMS management class that you could use too.
willy jensen
 
Posts: 307
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 42 times

Re: RETPD Parameters in DASD File

Postby samb01 » Wed Oct 02, 2019 2:47 pm

Hello Willy jensen,

yes it's production jobs.

ut there are jobs that runs many times a day.
So to save Tapes, we waant to use DASD dataset instead of tape with ADRDSSU.

Actually, we use that :


//************************************************                
//XOR20    EXEC PGM=ADRDSSU,COND=(20,EQ,XOR10)                    
//DUMMY    DD DUMMY                                                
//SYSPRINT DD DSN=&VVOJOB..S,DISP=(,CATLG,DELETE),      
//     DCB=(RECFM=FB,LRECL=133,BLKSIZE=27930),SPACE=(CYL,(5,2))    
//SYSIN    DD DISP=OLD,DSN=.&VVOJOB..A                    
//TAPE001  DD DISP=(NEW,CATLG),                                    
//     DSN=&VVORS..Y&VVCYYYY..D&VVCDDD..T&VVCHHMM..&VVOADID..A001,
//     UNIT=(VTS2,,DEFER),LABEL=(1,SL,RETPD=400)              
//*                                                                

 


and i 'd like to use that :


//************************************************                  
//XOR20    EXEC PGM=ADRDSSU,COND=(20,EQ,XOR10)                      
//DUMMY    DD DUMMY                                                
//SYSPRINT DD DSN=&VVQUAL1..&VVOJOB..S,DISP=(,CATLG,DELETE),        
//     DCB=(RECFM=FB,LRECL=133,BLKSIZE=13300),SPACE=(CYL,(5,2))    
//SYSIN    DD DISP=OLD,DSN=&VVQUAL1..&VVOJOB..A                    
//TAPE001  DD DISP=(NEW,CATLG),                                    
//     DSN=&VVORS..Y&VVCYYYY..D&VVCDDD..T&VVCHHMM..&VVOADID..A001,  
//     SPACE=(CYL,(5,5),RLSE),RETPD=400                    

 
samb01
 
Posts: 405
Joined: Mon Nov 16, 2009 7:24 pm
Has thanked: 1 time
Been thanked: 0 time

Re: RETPD Parameters in DASD File

Postby Blackthorn » Wed Oct 02, 2019 3:03 pm

samb01 wrote:I know GDG but the maximum limit is 255. So for a 400 days retention is too low...and as you said, Willy Jensen, il the bacth runs twice a day, GDG can't be the solution...


From z/OS v2.2, you can define "extended" format GDG's which allow up to 999 generations.
Blackthorn
 
Posts: 127
Joined: Tue Feb 01, 2011 7:12 pm
Has thanked: 1 time
Been thanked: 9 times

Re: RETPD Parameters in DASD File

Postby steve-myers » Wed Oct 02, 2019 5:48 pm

samb01 wrote:Hello and thank's for your advices.
But RETPD=45 is an example. Moste of ou batch's production the RETPD=400

I know GDG but the maximum limit is 255. So for a 400 days retention is too low...and as you said, Willy Jensen, il the bacth runs twice a day, GDG can't be the solution...

So what? You clearly stated that you want a limit of 45 for this application.

You want to save tapes? Are you not using virtual tapes? Who really cares how many pseudo tapes you're using?!
steve-myers
Global moderator
 
Posts: 2078
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 235 times

Re: RETPD Parameters in DASD File

Postby willy jensen » Wed Oct 02, 2019 6:30 pm

So if you are talking about production jobs, meaning many jobs, then I will recommend
1. extended GDG
2. proper SMS management class with HSM dasd housekeeping.
Actually I might exchange the order, because for (2) you do not have to change the datasetnames and create a bunch of GDGs.
willy jensen
 
Posts: 307
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 42 times

Next

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post