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

Problem with multiple delete using IDCAMS


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 1353
Location: Israel

PostPosted: Fri May 05, 2006 11:59 am
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts DELETE SPUFI DB2 1
No new posts DSNTIAUL driven delete IBM Tools 0
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
Search our Forums:

Back to Top