IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
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 Member


Joined: 31 Dec 2009
Posts: 580
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IBM Tools

 


Similar Topics
Topic Forum Replies
No new posts Validating record count of a file is ... DFSORT/ICETOOL 13
No new posts Merging 2 datasets into one DFSORT/ICETOOL 1
No new posts Selecting the max value from a file. DFSORT/ICETOOL 3
No new posts PL/I, VB Datasets and the RDW PL/I & Assembler 4
No new posts How do I SFTP a ADRDSSU file from mai... IBM Tools 4
Search our Forums:

Back to Top