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
 

 

Error while deleting a DATASET using IDCAMS

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

New User


Joined: 31 Oct 2012
Posts: 43
Location: INDIA

PostPosted: Sun Mar 24, 2013 1:31 pm    Post subject: Error while deleting a DATASET using IDCAMS
Reply with quote

Hi all..
I am trying to delete a dataset using IDCAMS.
The dataset already exists.
But the JCL ends with RC 8.
Anyone has an idea on how to fix it ?

I am pasting the JCL here :

//R04290V JOB (VV,BOBBY),'SIDDU',NOTIFY=&SYSUID
//*
//*********************************************************
//*
//* STEP TO DELETE THE DELE THE DATASET LAL.RES.FLALF037
//*
//*********************************************************
//*
//STP010 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//FILE DD DSN=R04290.DELETE.DATASET,DISP=(MOD,DELETE)
//SYSIN DD *
DELETE FILE
/*

N: The data set is deleting if the DISP=(MOD,DELETE)
The data set is not deleting if the DISP=OLD

But the return code for both of them is 8.


Any help would be appreciated.
Thank you.
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Sun Mar 24, 2013 1:54 pm    Post subject: Reply to: Error while deleting a DATASET using IDCAMS
Reply with quote

the error is due to the fact that You did not care to read the manuals
about the SYNTAX/FORMAT of the DELETE statement

start from
http://www-03.ibm.com/systems/z/os/zos/bkserv/index.html

and navigate to the bookshelf for the version/level of Your zOS
to arrive at something like
http://publib.boulder.ibm.com/infocenter/zos/v1r11/index.jsp?topic=/com.ibm.zos.r11.idai200/da6i2172.htm

and also do not forget to read and meditate on the
JCL guide
JCL reference
Back to top
View user's profile Send private message
tamminenisidhartha
Currently Banned

New User


Joined: 31 Oct 2012
Posts: 43
Location: INDIA

PostPosted: Sun Mar 24, 2013 2:43 pm    Post subject:
Reply with quote

@Enrico,

Hi enrico.
If the disp=(MOD,DELETE) the dataset is deleting.
But the RC is 8.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Sun Mar 24, 2013 2:48 pm    Post subject: Reply to: Error while deleting a DATASET using IDCAMS
Reply with quote

what is that You did not understand when I told ...

Quote:
the error is due to the fact that You did not care to read the manuals
about the SYNTAX/FORMAT of the DELETE statement


RTFM

anyway You are mixing up things ...

You must take a decision if You want
JCL to delete the dataset DISP=(<whatever>,DELETE)
or You want to do it using idcams
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Sun Mar 24, 2013 2:59 pm    Post subject: Re: Reply to: Error while deleting a DATASET using IDCAMS
Reply with quote

enrico-sorichetti wrote:
You must take a decision if You want
JCL to delete the dataset DISP=(<whatever>,DELETE)
or You want to do it using idcams
On a lighter note - If that understanding had been in place, question had not been asked at first place, IMHO! icon_smile.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Sun Mar 24, 2013 3:05 pm    Post subject: Reply to: Error while deleting a DATASET using IDCAMS
Reply with quote

but still the TS could have looked at the manuals to search for the message he received by IDCAMS

Code:
 ****** ***************************** Top of Data ******************************
 000001 //ENRICO1  JOB NOTIFY=&SYSUID,
 000002 //             REGION=0M,
 000003 //             MSGLEVEL=(1,1),CLASS=A,MSGCLASS=X
 000004 //*
 000005 //IDC     EXEC PGM=IDCAMS
 000006 //FILE      DD DISP=OLD,DSN=ENRICO.TEST.SOMEFILE
 000007 //SYSPRINT  DD SYSOUT=*
 000008 //SYSIN     DD *
 000009   DELETE FILE
 ****** **************************** Bottom of Data ****************************


to get
Code:
********************************* TOP OF DATA **********************************
IDCAMS  SYSTEM SERVICES                                           TIME: 10:18:51

  DELETE FILE
IDC3012I ENTRY FILE NOT FOUND
IDC3009I ** VSAM CATALOG RETURN CODE IS 8 - REASON CODE IS IGG0CLEG-42
IDC0551I ** ENTRY FILE NOT DELETED
IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 8

IDC0002I IDCAMS PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 8
******************************** BOTTOM OF DATA ********************************


that' s what the TS should have had the decency to post
but the TS did not care.

the TS qualifies as STUDENT, but he has a pretty shitty attitude for a student aiming to learn something
( whatever the field )

where is the intellectual need for research ... most probably down the toilet icon_wink.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Sun Mar 24, 2013 3:18 pm    Post subject: Reply to: Error while deleting a DATASET using IDCAMS
Reply with quote

advice to the TS
to make the most out of the questions You ask,
You should read and meditate on
How To Ask Questions The Smart Way
here
http://catb.org/~esr/faqs/smart-questions.html
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Sun Mar 24, 2013 6:44 pm    Post subject:
Reply with quote

tamminenisidhartha, I strongly recommend you stop posting on this forum and switch to Beginners and Students Forum as the expertise and attitude you expressed in your posts in this thread indicate that you are not a professional but a beginner (no matter how many years of "experience" you claim to have).

Quote:
If the disp=(MOD,DELETE) the dataset is deleting.
But the RC is 8.
Your results are EXACTLY what you should get -- the system is working precisely as designed, even to the RC 8.
Back to top
View user's profile Send private message
tamminenisidhartha
Currently Banned

New User


Joined: 31 Oct 2012
Posts: 43
Location: INDIA

PostPosted: Tue Apr 02, 2013 7:46 pm    Post subject:
Reply with quote

I have done it successfully.

Thank you for all the valuable suggestions.
Back to top
View user's profile Send private message
Gary McDowell

Active User


Joined: 15 Oct 2012
Posts: 139
Location: USA

PostPosted: Wed Apr 03, 2013 12:07 am    Post subject:
Reply with quote

I usually do something like...
Code:
//STEP010  EXEC PGM=IDCAMS           
//SYSPRINT DD SYSOUT=*               
//SYSOUD   DD SYSOUT=*               
//SYSOUT   DD SYSOUT=*               
//SYSIN    DD *                       
   DELETE FILE.NAME.HERE        PURGE
     IF MAXCC < 12 THEN SET MAXCC = 0
/*                                   
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 990
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Wed Apr 03, 2013 1:13 pm    Post subject:
Reply with quote

Gary McDowell wrote:
I usually do something like...
Code:
//STEP010  EXEC PGM=IDCAMS           
//SYSPRINT DD SYSOUT=*               
//SYSOUD   DD SYSOUT=*               
//SYSOUT   DD SYSOUT=*               
//SYSIN    DD *                       
   DELETE FILE.NAME.HERE        PURGE
     IF MAXCC < 12 THEN SET MAXCC = 0
/*                                   


...and, if the TS had coded this, the issue would have been masked by resetting the CC=8. Not really ideal, IMHO.

Garry
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 S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts Error during restore rename archanamuthukrishnan All Other Mainframe Topics 2 Fri Oct 14, 2016 3:30 pm
No new posts Error IEC161I 052(009,XXXRS00)-084 wh... amitc23 JCL & VSAM 10 Wed Oct 12, 2016 5:00 pm


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