Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
delete a number of uncataloged datasets all on same volser

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
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    Post subject: delete a number of uncataloged datasets all on same volser
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    Post subject: Reply to: delete a number of uncataloged datasets all on sam
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    Post subject:
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: 445
Location: London

PostPosted: Fri Aug 01, 2014 3:15 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Skip file from delete pema_yozer All Other Mainframe Topics 3 Tue Aug 29, 2017 3:19 pm
No new posts Delete IMS remote transaction when MO... Sam Singh IMS DB/DC 0 Wed Aug 23, 2017 9:12 pm
No new posts Profile changed to NUMBER ON STD (fro... Martylin TSO/ISPF 1 Thu Aug 03, 2017 9:14 am
No new posts REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
No new posts SMTP the current generation number of... Jyothi Kulunde JCL & VSAM 4 Thu May 04, 2017 4:08 pm

Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us