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

JCL to delete itself from a PDS after successful execution


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rakesh17684

New User


Joined: 08 Oct 2006
Posts: 61
Location: San Diego

PostPosted: Mon Apr 20, 2009 10:51 am
Reply with quote

I am searching for a utility or any other method via the job itself, so that after sucessful execution of the job it will delete itself from the PDS it was run.
Currently i have been using this step in my job for the same purpose

MYID.TEST.JCLLIB(mem1)
mem1 is the member in which job is present and MYID.TEST.JCLLIB is the PDS name

Code:

000009 //IEBCOPY  EXEC PGM=IEBCOPY
000010 //*
000011 //CA7PDS    DD DSN=MYID.TEST.JCLLIB,DISP=SHR
000012 //*
000013 //SYSOUT    DD SYSOUT=*
000014 //SYSPRINT  DD SYSOUT=*
000015 //SYSIN     DD *
000016   EDITDIR  OUTDD=CA7PDS
000017   DELETE   MEMBER=mem1
000018 /*
000019 //*


but am looking for an alternative approach, in which i need to avoid giving the PDS name MYID.TEST.JCLLIB.
The member name if present in JCL is fine
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Apr 20, 2009 2:15 pm
Reply with quote

Well, if you do not specify the correct PDS to delete the member from ........
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Mon Apr 20, 2009 10:06 pm
Reply with quote

My prior site used this method before a scheduler pkg was obtained. All daily work was loaded into a PDS for the operators to submit.

Our method used a special utility pgm to copy member to INTRDR and delete at submit time rather than completion. Once the member was gone you knew the job had been submitted.

Of course, we knew the PDS name and didn't have to divine it from some mysterious method.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Tue Apr 21, 2009 8:12 am
Reply with quote

When I read the original post, the 1st thing to come to my mind was... Mission Impossible. icon_lol.gif
Back to top
View user's profile Send private message
rakesh17684

New User


Joined: 08 Oct 2006
Posts: 61
Location: San Diego

PostPosted: Wed Apr 22, 2009 6:56 pm
Reply with quote

hmmmm... i was just expecting something out of the blue.. that i have never seen before in my JCL world

The problem is the whole of the JCL barring the delete step was/is created by a COBOL program. Now there came a immediate (and sudden) requirement to have a delete step to have that JCL delete step.
now all the JCL in our shop had the delete step i have put and the COBOL prog passing the PDS name, like where the job is submitted,demanded and executed. Poor them, didnt knew the prog i wrote for this JCL didnt have the code to pass the PDS name. so i have a extra burden of adding lines in prog which i thought would be a waste if there is something else present
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 DELETE SPUFI DB2 1
No new posts DSNTIAUL driven delete IBM Tools 0
No new posts Capturing Job Execution Information All Other Mainframe Topics 3
No new posts How to delete a user's alias from the... JCL & VSAM 11
No new posts Delete file row if blanks in the firs... DFSORT/ICETOOL 5
Search our Forums:

Back to Top