View previous topic :: View next topic
|
Author |
Message |
ektaag
New User
Joined: 21 Mar 2007 Posts: 14 Location: bangalore
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Yes - sounds REALLY weird
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
do you mean physically delete the dataset, or override the dd statement to DUMMY? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Quote: |
don't use IEFBR14 since that'll cause a JCL error if the file doesn't exist. |
Tsk, and you a sysprog too
IEFBR14 does OK with DISP=(MOD,DELETE,DELETE),SPACE=(TRK,0) |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Expat: do you REALLY think DISP=(MOD,DELETE,DELETE) would be the first DISP that would be tried? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
yeah, I am having a great day. |
I see |
|
Back to top |
|
|
|