View previous topic :: View next topic
|
Author |
Message |
tamminenisidhartha Currently Banned New User
Joined: 31 Oct 2012 Posts: 43 Location: INDIA
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
Back to top |
|
|
tamminenisidhartha Currently Banned New User
Joined: 31 Oct 2012 Posts: 43 Location: INDIA
|
|
|
|
@Enrico,
Hi enrico.
If the disp=(MOD,DELETE) the dataset is deleting.
But the RC is 8. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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! |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
tamminenisidhartha Currently Banned New User
Joined: 31 Oct 2012 Posts: 43 Location: INDIA
|
|
|
|
I have done it successfully.
Thank you for all the valuable suggestions. |
|
Back to top |
|
|
Gary McDowell
Active User
Joined: 15 Oct 2012 Posts: 139 Location: USA
|
|
|
|
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 |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
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 |
|
|
|