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

Active User


Joined: 31 Oct 2006
Posts: 131
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

Senior Member


Joined: 07 Feb 2009
Posts: 1306
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
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 Check data with Exception Table DB2 0
No new posts Moving Or setting POINTER to another ... COBOL Programming 2
No new posts Change Default Scroll Setting TSO/ISPF 1
No new posts Abend S0C4 11 (Page Translation Excep... PL/I & Assembler 16
No new posts Setting CA7 user variable from data s... CA Products 7
Search our Forums:

Back to Top