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 Usergroups Profile Log in to check your private messages Log in
 

 

Problem with multiple delete using IDCAMS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
raveendra_ibm
Currently Banned

New User


Joined: 07 Jan 2006
Posts: 31

PostPosted: Fri May 05, 2006 10:18 am    Post subject: Problem with multiple delete using IDCAMS
Reply with quote

Hi All,

I am getting a MAXCC 12 while trying to delete generically.

Here are the details :

JCL:

Code:
//PCKDEL1 JOB (CK00,P),'QF35HJC',NOTIFY=&SYSUID,       
//             CLASS=T,MSGLEVEL=(1,1),TIME=5,MSGCLASS=T
//*                                                   
//STEP1    EXEC  PGM=IDCAMS                           
//SYSPRINT DD   SYSOUT=A                               
//SYSIN    DD   *                                     
  DELETE -
          BB1459.RTR1.TST.*.*
/*                                                     
//       



SYSPRINT - Message :

Code:
IDCAMS  SYSTEM SERVICES

  DELETE -                                                           
     BB1459.RTR1.TST.*.*.*                                           
IDC3203I ITEM 'BB1459.RTR1.TST.*.*.' DOES NOT ADHERE TO RESTRICTIONS
IDC3202I ABOVE TEXT BYPASSED UNTIL NEXT COMMAND. CONDITION CODE IS 12                 


Could you please help me out with this. I have 50-100 deletions to be made using these qualifiers.

Thanks and Regards,
Raveendra.
Back to top
View user's profile Send private message

Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1224
Location: Israel

PostPosted: Fri May 05, 2006 11:59 am    Post subject:
Reply with quote

First I would try again with DELETE CLUSTER.
If it still doesn't work, I would try starting with a full name and adding an asterisk each time, like this:
Code:
  DELETE CLUSTER -
      BB1459.RTR1.TST.TR.D060505.T1

  DELETE CLUSTER -
      BB1459.RTR1.TST.TR.D060505.*

  DELETE CLUSTER -
      BB1459.RTR1.TST.TR.*.*

  DELETE CLUSTER -
      BB1459.RTR1.TST.*.*.*

until it stops working.
If you cannot put more than one "*" (which I haven't checked), just remember that you can code:
Code:
  DELETE CLUSTER -
      BB1459.RTR1.TST.TR.*.T1
Back to top
View user's profile Send private message
IQofaGerbil

Active User


Joined: 05 May 2006
Posts: 183
Location: Scotland

PostPosted: Fri May 05, 2006 9:03 pm    Post subject: Re: Problem with multiple delete using IDCAMS
Reply with quote

you could try this

do a LISTCAT of the HLQ that you need and
write the output to a file

//S01 EXEC PGM=IDCAMS
//SYSPRINT DD DSN=XXX.IDCLIST,
// DISP=SHR
//SYSIN DD *
LISTCAT LEVEL(YOUR.LOWEST.LEVEL.DSN) -
NONVSAM -
NAME
//*

the data I created used looks like this
IDCAMS SYSTEM SERVICES

LISTCAT LEVEL(YOUR.LOWEST.LEVEL.DSN) -
NONVSAM -
NAME
NONVSAM ------- YOUR.LOWEST.LEVEL.DSN.XXX.Z01
IN-CAT --- CATALOG.ICF.VLIB001
NONVSAM ------- YOUR.LOWEST.LEVEL.DSN.XXX.Z02
IN-CAT --- CATALOG.ICF.VLIB001
NONVSAM ------- YOUR.LOWEST.LEVEL.DSN.XXX.Z03
IN-CAT --- CATALOG.ICF.VLIB001
NONVSAM ------- YOUR.LOWEST.LEVEL.DSN.Z04.X01.Y01
IN-CAT --- CATALOG.ICF.VLIB001
NONVSAM ------- YOUR.LOWEST.LEVEL.DSN.XXX.Z05.X02
IN-CAT --- CATALOG.ICF.VLIB001

select the dataset names from the output (assuming they are all NONVSAM here, yours may be different so tailor the select command) and build a series of DELETE commands into another file

//S02 EXEC PGM=SORT
//SORTIN DD DSN=XXX.IDCLIST,DISP=SHR
//SORTOUT DD DSN=YYY.IDCLIST.DELETE,
// DISP=SHR
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(6,07,CH,EQ,C'NONVSAM')
OUTFIL OUTREC=(C' DELETE ',12:21,36),CONVERT
//*

The aim is to create a DELETE file now like this

DELETE YOUR.LOWEST.LEVEL.DSN.XXX.Z01
DELETE YOUR.LOWEST.LEVEL.DSN.XXX.Z02
DELETE YOUR.LOWEST.LEVEL.DSN.XXX.Z03
DELETE YOUR.LOWEST.LEVEL.DSN.Z04.X01.Y01
DELETE YOUR.LOWEST.LEVEL.DSN.XXX.Z05.X02

now execute IDCAMS deletes using file above

//S03 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD DSN=YYY.IDCLIST.DELETE,DISP=SHR
//*********************************
final check to confirm all deleted

//S04 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
LISTCAT LEVEL(YOUR.LOWEST.LEVEL.DSN) -
NONVSAM -
NAME
//*

hope this helps
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts JCL to delete component in a package sundaram.naveen Compuware & Other Tools 14 Tue Nov 29, 2016 6:21 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts Problem in Running Query via JCL vickey_dw DB2 3 Tue Oct 18, 2016 11:11 pm


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