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

delete a number of uncataloged datasets all on same volser


 
IBM Mainframe Forums -> SYNCSORT
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
PokerGuru

New User


Joined: 23 Jul 2010
Posts: 33
Location: Europe

PostPosted: Tue Apr 01, 2014 8:10 pm
Reply with quote

I need to delete 8 uncataloged datasets all on the same volser, preferably using IDCAMS and mask if possible like in my first delete statement below(which works but not for uncataloged volumes). I can hardcode them if required.

Code:

//PRECLEAN EXEC PGM=IDCAMS                                           
//SYSPRINT DD SYSOUT=*                                               
//*D1      DD  VOL=SER=PMA002,DISP=SHR,UNIT=DISK                     
* DELETE QARESM1.QAR12*.*12.GDG*.SID*.G000*V00 MASK                 
  DELETE QARESM1.QAR126.OLD12.GDG1.SIDXE74.G0001V00,VOL=SER=PMA002   
  DELETE QARESM1.QAR126.OLD12.GDG1.SIDXE74.G0002V00,VOL=SER=PMA002   
  DELETE QARESM1.QAR126.OLD12.GDG1.SIDXE74.G0003V00,VOL=SER=PMA002   
  DELETE QARESM1.QAR126.OLD12.GDG1.SIDXE74.G0004V00,VOL=SER=PMA002   
  DELETE QARESM1.QAR127.NEW12.GDG1.SIDXE74.G0001V00,VOL=SER=PMA002   
  DELETE QARESM1.QAR127.NEW12.GDG1.SIDXE74.G0002V00,VOL=SER=PMA002   
  DELETE QARESM1.QAR127.NEW12.GDG1.SIDXE74.G0003V00,VOL=SER=PMA002   
  DELETE QARESM1.QAR127.NEW12.GDG1.SIDXE74.G0004V00,VOL=SER=PMA002   
  SET MAXCC = 0                                                     
/*                                                                   
Back to top
View user's profile Send private message
PokerGuru

New User


Joined: 23 Jul 2010
Posts: 33
Location: Europe

PostPosted: Tue Apr 01, 2014 8:55 pm
Reply with quote

this works, however with "MASK" would be nice but doesnt seem to:
Code:

//PRECLEAN EXEC PGM=IDCAMS                                   
//SYSPRINT DD SYSOUT=*                                       
//DD1 DD UNIT=SYSDA,VOL=SER=PMA002,DISP=SHR                 
//SYSIN DD *                                                 
  DELETE QARESM1.QAR126.OLD12.GDG1.SIDXE74.G0001V00 NVR -   
  FILE(DD1)                                                 
  DELETE QARESM1.QAR126.OLD12.GDG1.SIDXE74.G0002V00 NVR -   
  FILE(DD1)                                                 
  DELETE QARESM1.QAR126.OLD12.GDG1.SIDXE74.G0003V00 NVR -   
  FILE(DD1)                                                 
  DELETE QARESM1.QAR126.OLD12.GDG1.SIDXE74.G0004V00 NVR -   
  FILE(DD1)                                                 
  DELETE QARESM1.QAR127.NEW12.GDG1.SIDXE74.G0001V00 NVR -   
  FILE(DD1)                                                 
  DELETE QARESM1.QAR127.NEW12.GDG1.SIDXE74.G0002V00 NVR -   
  FILE(DD1)                                                 
  DELETE QARESM1.QAR127.NEW12.GDG1.SIDXE74.G0003V00 NVR -   
  FILE(DD1)                                                 
  DELETE QARESM1.QAR127.NEW12.GDG1.SIDXE74.G0004V00 NVR -   
  FILE(DD1)                                                 
* DELETE QARESM1.QAR12*.*12.GDG*.SID*.G000*V00 MASK NVR -   
* FILE(DD1)                                                 
  SET MAXCC = 0                                             
/*                                                           
Back to top
View user's profile Send private message
PokerGuru

New User


Joined: 23 Jul 2010
Posts: 33
Location: Europe

PostPosted: Tue Apr 01, 2014 8:59 pm
Reply with quote

MASK not possible with NVR

Code:

IDCAMS  SYSTEM SERVICES                                           TIME:
                                                                       
  DELETE QARESM1.QAR12*.*12.GDG*.SID*.G000*V00 NVR MASK -             
  FILE(DD1)                                                           
IDC2899I MASK PARAMETER NOT ALLOWED FOR NVR, VVR, TRUENAME, LIBENT,   
IDC2899I VOLENT OR PARTITIONED DATA SET MEMBER DELETE                 
IDC3003I FUNCTION TERMINATED. CONDITION CODE IS 12                     
                                                                       
  SET MAXCC = 0                                                       
                                                                       
IDC0002I IDCAMS PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 0     
Back to top
View user's profile Send private message
Pete Wilson

Active User


Joined: 31 Dec 2009
Posts: 488
Location: London

PostPosted: Fri Aug 01, 2014 3:15 pm
Reply with quote

You need to be sure the NVR or VVR's are truly orphaned by doing a DIAGNOSE of the volume which will report what the errors really are. If you're sure then you can also use DFDSS (ADRDSSU) to do a Physical DUMP DELETE of the uncataloged datasets NVR/VVR and DSCB's, and that does allow masking. Suggest running with PARM='TYPRUN=NORUN' initially to simulate and see what it'll do before removing the parm to do it for real.
e.g.
Code:
//*                                                                 
//* DUMP AND DELETE UNCATALOGED DATASETS. (MUST BE A PHYSICAL DUMP) 
//*                                                                 
//STEP1   EXEC PGM=ADRDSSU,REGION=128M,PARM='TYPRUN=NORUN'           
//SYSPRINT DD  SYSOUT=*                                             
//TAPE     DD  DUMMY                                                 
//SYSIN    DD  *                                                     
   DUMP DS(INC( -                                                   
  QARESM1.QAR12*.*12.GDG*.SID*.G000*V00 -                           
  QARESM1.QAR126.OLD12.GDG1.SIDXE74.G0001V00 -                       
  QARESM1.QAR126.OLD12.GDG1.SIDXE74.G0002V00 -                       
  QARESM1.QAR126.OLD12.GDG1.SIDXE74.G0003V00 -                       
  QARESM1.QAR126.OLD12.GDG1.SIDXE74.G0004V00 -                       
  QARESM1.QAR127.NEW12.GDG1.SIDXE74.G0001V00 -                       
  QARESM1.QAR127.NEW12.GDG1.SIDXE74.G0002V00 -                       
  QARESM1.QAR127.NEW12.GDG1.SIDXE74.G0003V00 -                       
  QARESM1.QAR127.NEW12.GDG1.SIDXE74.G0004V00 -                       
                 ) -                                                 
        BY((CREDT LE *,-7)     -                                     
           (CATLG EQ NO)))     -                                     
        OUTDDNAME(TAPE)        -                                     
        DELETE PURGE           -                                     
       PHYSINDYNAM(PMA002)                   



Sometimes it also pays to print the VVDS of the volume and check what usercatalog the your 'uncataloged' datasets are in because the alias could have been repointed to another catalog, or the datasets may have been renamed to new HLQ whose alias is not in the same catalog. In this case you can sometimes just use a MERGECAT to move the entries to the correct catalog and they'll then be cataloged properly and visible.

Also, sometimes the uncataloged files can simply be recataloged if they are a result of a 'partial delete'. You just do a DEFINE with the RECATALOG parameter and it'll rebuild the usercatalog entry from information stored in the VVDS.

Code'd
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 -> SYNCSORT
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Forum Replies
No new posts Need to delete inactive records from ... DB2 5
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 Sort to construct single record from ... SYNCSORT 3

Back to Top