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
 

 

JCL to delete itself from a PDS after successful execution

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

New User


Joined: 08 Oct 2006
Posts: 59
Location: Atlanta

PostPosted: Mon Apr 20, 2009 10:51 am    Post subject: JCL to delete itself from a PDS after successful execution
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: 8593
Location: Back in jolly old England

PostPosted: Mon Apr 20, 2009 2:15 pm    Post subject:
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    Post subject:
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: 1239
Location: Richfield, MN, USA

PostPosted: Tue Apr 21, 2009 8:12 am    Post subject:
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: 59
Location: Atlanta

PostPosted: Wed Apr 22, 2009 6:56 pm    Post subject:
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    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 JCL to delete component in a package sundaram.naveen Compuware & Other Tools 14 Tue Nov 29, 2016 6:21 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
This topic is locked: you cannot edit posts or make replies. JCL MULTIPLE STEP EXECUTION QUERY Susanta JCL & VSAM 18 Sat Jul 30, 2016 1:17 pm
No new posts Delete record or Reset RC code using ... mpawan Compuware & Other Tools 4 Tue Jul 26, 2016 3:52 pm
No new posts output DDname JESMSGLG job during exe... italo_pm TSO/ISPF 16 Tue Jun 21, 2016 11:13 am


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