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

How to delete dataset when previous step abended


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
raz832

New User


Joined: 27 Mar 2007
Posts: 15
Location: Chennai

PostPosted: Thu Jan 24, 2008 11:35 am
Reply with quote

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
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Thu Jan 24, 2008 12:18 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jan 24, 2008 12:50 pm
Reply with quote

Or read the manual about condition code checking related to abends rather than return codes.
Back to top
View user's profile Send private message
raz832

New User


Joined: 27 Mar 2007
Posts: 15
Location: Chennai

PostPosted: Thu Jan 24, 2008 2:34 pm
Reply with quote

Hi murali,

its working with the disp=(shr,catlg,delete) in the program running step.

Thanks a lot.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Thu Jan 24, 2008 2:37 pm
Reply with quote

Rajesh,

Quote:
disp=(shr,catlg,delete)

Is this a proper disp parameter for an o/p file?
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 DELETE SPUFI DB2 1
No new posts DSNTIAUL driven delete IBM Tools 0
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Reorg abended with REASON=X'00E40347' DB2 2
Search our Forums:

Back to Top