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

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


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 8797
Location: Welsh Wales

PostPosted: Wed Jul 23, 2008 6:26 pm
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: 6966
Location: porcelain throne

PostPosted: Wed Jul 23, 2008 6:28 pm
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Jul 23, 2008 6:33 pm
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

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Wed Jul 23, 2008 6:34 pm
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: 8797
Location: Welsh Wales

PostPosted: Wed Jul 23, 2008 6:36 pm
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Jul 23, 2008 6:48 pm
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: 8797
Location: Welsh Wales

PostPosted: Wed Jul 23, 2008 6:52 pm
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: 6966
Location: porcelain throne

PostPosted: Wed Jul 23, 2008 6:54 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Jul 23, 2008 6:56 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts DELETE SPUFI DB2 1
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top