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

DSNTEP2 - setting exception


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jzhardy

New User


Joined: 31 Oct 2006
Posts: 89
Location: brisbane

PostPosted: Thu May 28, 2020 4:51 pm
Reply with quote

in SQL I can force an exception (ie SQL state), but the net result is that the Job Step gets an RC 8.

Is there any way I can elevate the RC to a higher value ? Note that the step could fail for another condition - eg, insufficient user privileges - and for these I would always want to see RC 8. But I need to be able to identify a special condition based on RC.

I'll provide more details tomorrow as I'm writing this away from work.
Back to top
View user's profile Send private message
prino
Warnings : 1

Senior Member


Joined: 07 Feb 2009
Posts: 1244
Location: Vilnius, Lithuania

PostPosted: Thu May 28, 2020 10:08 pm
Reply with quote

In PL/I

"if my_special_condition_is_met then call pliretv(42);"

And COBOL has a similar way to set return codes
Back to top
View user's profile Send private message
enrico-sorichetti

Senior Moderator


Joined: 14 Mar 2007
Posts: 10729
Location: italy

PostPosted: Thu May 28, 2020 10:50 pm
Reply with quote

the source for dsntep2 is available and can be modified,
You just need a pl/I compiler

the idug once upon a time used to have CSNTEP2 the equivalent of dsntep2 but written in cobol

it still there, not the latest thing but You might get a few ideas out of it

www.idug.org/page/codeplace-listing
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Exception Filter CA Products 0
No new posts Execute DSNTEP2 in REXX which is call... CLIST & REXX 4
No new posts Setting up a name counter in the coup... CICS 2
This topic is locked: you cannot edit posts or make replies. S0C4-X'11' issue - page translation e... JCL & VSAM 10
No new posts Conditional setting of return-code af... COBOL Programming 9
Search our Forums:

Back to Top