IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in
 

ADRDSSU BY(REFDT... not selecting correct datasets


 
IBM Mainframe Forums -> IBM Tools
Post new topic   Reply to topic
View previous topic :: :: View next topic  
Author Message
Greg Roschel

New User


Joined: 11 Sep 2019
Posts: 2
Location: USA

PostPosted: Wed Sep 18, 2019 7:23 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Senior Member


Joined: 14 Mar 2007
Posts: 10695
Location: italy

PostPosted: Wed Sep 18, 2019 10:05 pm
Reply with quote

Code:
BY( REFDT LT (*,-xxxx) )

used to work for me
Back to top
View user's profile Send private message
Greg Roschel

New User


Joined: 11 Sep 2019
Posts: 2
Location: USA

PostPosted: Wed Sep 18, 2019 10:40 pm
Reply with quote

I've tried that and many more variations of it, all to no avail. Thanks for the reply.
Back to top
View user's profile Send private message
Pete Wilson

Active User


Joined: 31 Dec 2009
Posts: 488
Location: London

PostPosted: Wed Jun 24, 2020 7:32 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> IBM Tools
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Forum Replies
No new posts Compare Two datasets and Override Mat... DFSORT/ICETOOL 7
No new posts Compare Two datasets and get the 1st ... DFSORT/ICETOOL 7
No new posts Need a Macro to compare datasets and ... All Other Mainframe Topics 2
No new posts adrdssu for copy all data JCL & VSAM 5
No new posts adrdssu tool to dump a files from a PDS JCL & VSAM 5

Back to Top