View previous topic :: View next topic
|
Author |
Message |
Greg Roschel
New User
Joined: 11 Sep 2019 Posts: 2 Location: USA
|
|
|
|
I am attempting to delete all temp datasets where the last referenced date is at least 90 days old in storage group XXTEMP by executing ADRDSSU with the following command:
DUMP STORGRP(XXTEMP) -
DATASET -
( -
EXCLUDE(SYS1.VTOCIX.** -
SYS1.VVDS.**) -
BY((REFDT,LT,*,-90)) -
) -
DELETE -
PURGE -
OUTDD(SGPRINT)
At the present, I am running with PARM='TYPRUN=NORUN' until I get this working correctly. This is under z/OS v2r2.
The results I'm getting are not what I expected. The datasets being selected by ADRDSSU are today's datasets only. No matter what "*,-n" I select, I get today's datasets only.
Yes, I RTFM'd & practically every mainframe web site I could find. I tried using spaces, then commas in the BY statement. I tried using more parentheses, less parentheses. I tried everything I could thing of but am unable to figure out what I'm doing wrong.
Any help/suggestions would be greatly appreciated. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10891 Location: italy
|
|
|
|
Code: |
BY( REFDT LT (*,-xxxx) ) |
used to work for me |
|
Back to top |
|
|
Greg Roschel
New User
Joined: 11 Sep 2019 Posts: 2 Location: USA
|
|
|
|
I've tried that and many more variations of it, all to no avail. Thanks for the reply. |
|
Back to top |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 592 Location: London
|
|
|
|
This works for me when I tested it. I think you need the BY statement as part of the INCLUDE rather than the EXCLUDE.
Code: |
//DUMP EXEC PGM=ADRDSSU,PARM='TYPRUN=NORUN'
//TAPE1 DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DUMP ODD(TAPE1) ALLE OPT(4) DELETE PURGE -
STORGRP(WORKPOOL) -
DS(INC(SYS%%%%%.T%%%%%%.RA000.** -
) -
BY(REFDT,LE,*,-2) -
EXC(SYS1.*)) |
|
|
Back to top |
|
|
|