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
 

 

I want to delete a file in a step that is bypassed.

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

New User


Joined: 21 Mar 2007
Posts: 14
Location: bangalore

PostPosted: Wed Jul 23, 2008 6:16 pm    Post subject: I want to delete a file in a step that is bypassed.
Reply with quote

Hi,

It may sound weird but this is the requirement.

I need to delete a file in a step even though when it is bypassed.
I can't use the PBSDR15 utility as this step is in PROC.

Any suggestion would be appreciated.


Thanks,
Ekta
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: Wed Jul 23, 2008 6:26 pm    Post subject:
Reply with quote

Yes - sounds REALLY weird icon_biggrin.gif

What is the problem in leaving the file in place ?

Have you tried to override the PROC to dummy the DD from that step
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Wed Jul 23, 2008 6:28 pm    Post subject:
Reply with quote

do you mean physically delete the dataset, or override the dd statement to DUMMY?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8117
Location: East Dubuque, Illinois, USA

PostPosted: Wed Jul 23, 2008 6:33 pm    Post subject:
Reply with quote

Weird requirement for sure.

If the step is bypassed, it's not being executed. If the file delete is that step, you're going to have to add a step, either in the PROC or separately, to delete the file.

If you mean that the file is used in a step that can be bypassed, your best bet is to add an IDCAMS step that deletes the file; don't use IEFBR14 since that'll cause a JCL error if the file doesn't exist.
Back to top
View user's profile Send private message
Garry Carroll

Active Member


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

PostPosted: Wed Jul 23, 2008 6:34 pm    Post subject:
Reply with quote

Does the file get deleted when the step runs? Does the delete have to happen before further step(s) run?

Can you not add a step into the PROC that is cond-coded to execute only if the step you mention is bypassed/doesn't run? If not, and the remaining steps don't reference the file, can you add a step into the invoking job that will delete the file at end-of-job?

Garry.
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: Wed Jul 23, 2008 6:36 pm    Post subject:
Reply with quote

Quote:
don't use IEFBR14 since that'll cause a JCL error if the file doesn't exist.

Tsk, and you a sysprog too icon_lol.gif

IEFBR14 does OK with DISP=(MOD,DELETE,DELETE),SPACE=(TRK,0)
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8117
Location: East Dubuque, Illinois, USA

PostPosted: Wed Jul 23, 2008 6:48 pm    Post subject:
Reply with quote

Expat: do you REALLY think DISP=(MOD,DELETE,DELETE) would be the first DISP that would be tried?
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: Wed Jul 23, 2008 6:52 pm    Post subject:
Reply with quote

Robert Sample wrote:
Expat: do you REALLY think DISP=(MOD,DELETE,DELETE) would be the first DISP that would be tried?

Of course, it's always the first one I try when deleting a dataset icon_biggrin.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Wed Jul 23, 2008 6:54 pm    Post subject:
Reply with quote

Robert,

since you have such little faith in the posters' ability to use DISP parm properly, maybe you should have included that in your original post,
then expat (a rookie for sure) would not have made his crude, improper and thoughless comment.

yeah, I am having a great day.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Wed Jul 23, 2008 6:56 pm    Post subject: Reply to: I want to delete a file in a step that is bypassed
Reply with quote

Quote:
yeah, I am having a great day.

I see icon_biggrin.gif
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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Restart=Step not working ALAK SAHA JCL & VSAM 6 Fri Jun 30, 2017 6:28 pm


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