Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to delete dataset when previous step abended

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to delete dataset when previous step abended
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: 1439
Location: Bangalore,India

PostPosted: Thu Jan 24, 2008 12:18 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Jan 24, 2008 12:50 pm    Post subject:
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    Post subject:
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: 1439
Location: Bangalore,India

PostPosted: Thu Jan 24, 2008 2:37 pm    Post subject:
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    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
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
No new posts it is possible output a SET value fro... Martylin JCL & VSAM 5 Fri Sep 22, 2017 7:08 am
No new posts Fetch Previous month & year in MM... girishb2 DFSORT/ICETOOL 3 Thu Sep 21, 2017 9:54 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us