View previous topic :: View next topic
|
Author |
Message |
raz832
New User
Joined: 27 Mar 2007 Posts: 15 Location: Chennai
|
|
|
|
I have to delete the output file whenever my program step gets an abend. But when I tried to do this in the proc using condition parameter as shown below:
Program will run in step PS020
Code: |
//PS022 EXEC PGM=PCABEND,
// COND=(0,EQ,PS020),
// PARM=2010
//SYSPRINT DD DUMMY
//DELFILE DD DSN=&HLQ..&JOB..E.CORCAPT,
// DISP=(OLD,DELETE,DELETE)
|
Here after the program step PS020 got an abend the remainng steps in the proc are getting flush out and output dataset has not been deleted, which should not happen for my requirement.
Could you please suggest any solution for this? |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Rajesh,
Quote: |
Here after the program step PS020 got abend the remainng steps in the proc are getting flush out and output dataset has not been deleted,which should not happen for my requirement. |
If you want to delete the o/p files on 'job abend', why dont you code in disp parameter itself?
or
if you need it as seperate step, go thru the jcl 'if/else/endif' (easy option than banging your head with cond parameter). |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Or read the manual about condition code checking related to abends rather than return codes. |
|
Back to top |
|
|
raz832
New User
Joined: 27 Mar 2007 Posts: 15 Location: Chennai
|
|
|
|
Hi murali,
its working with the disp=(shr,catlg,delete) in the program running step.
Thanks a lot. |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Rajesh,
Quote: |
disp=(shr,catlg,delete) |
Is this a proper disp parameter for an o/p file? |
|
Back to top |
|
|
|