Page 1 of 1

ALTER expiration date for DATASET in JCL

PostPosted: Tue Apr 23, 2019 2:46 pm
by droxolf
Hello all,

i wish alter managementclass and expiration date for a dataset in JCL.

For management class, i use PGM=IKJEFT01 ans SYSIN next :
ALTER MY.DATASET.NAME MGMTCLAS(MCXXX)
==> it's WORK


But how to do for alter expiration date dataset in JCL ?

//STEP1   EXEC PGM=IDCAMS            
//SYSPRINT DD SYSOUT=X                            
//SYSIN    DD *                                  
 ALTER -                                          
 MY.DATASET.NAME -
 TO(2019110)                                      
/*



Thanks for your help.

Re: ALTER expiration date for DATASET in JCL

PostPosted: Tue Apr 23, 2019 4:22 pm
by expat
Talk to your storage management people as some functions - such as expiration date may be disabled by the management class.
That was one thing that I always did - don't let users specify retentions outside of the management class.

Re: ALTER expiration date for DATASET in JCL

PostPosted: Tue Apr 23, 2019 8:12 pm
by willy jensen
Well you can but only if you open the dataset for update:
//SYSUT2 DD DSN=data.set.name,DISP=SHR,RETPD=19200
The manual says that the RETPD syntax for dates after jan 1st 2000 is yyyy/ddd, but when I try that I get message IEFC650I INCORRECT USE OF SLASH IN THE RETPD FIELD. I haven't investigated.

Re: ALTER expiration date for DATASET in JCL

PostPosted: Tue Apr 23, 2019 10:17 pm
by Robert Sample
EXPDT supports YYYY/DDD but RETPD is just a number of days (up to 93000 after z/OS 1.12; up to 9999 before that).

Re: ALTER expiration date for DATASET in JCL

PostPosted: Tue Apr 23, 2019 11:05 pm
by willy jensen
Of course, blame it on senior moments.
,EXPDT=2019/200 works fine - but still only for open with update.

Re: ALTER expiration date for DATASET in JCL

PostPosted: Wed Apr 24, 2019 11:59 am
by expat
expat wrote:Talk to your storage management people as some functions - such as expiration date may be disabled by the management class.
That was one thing that I always did - don't let users specify retentions outside of the management class.


Until the OP establishes that they are actually permitted to make the changes .................