View previous topic :: View next topic
|
Author |
Message |
Nileshkul
New User
Joined: 09 May 2016 Posts: 43 Location: India
|
|
|
|
Hi,
I am trying to handle a user failure code (via ABENDCC) in a scheduled job - the failure code is being assigned by scheduler I guess (something like U0XX).
Now when I try to test same code in with my id, the user code (U0XX) is not reported but just RC12 on file copy step (IEBGENER - copying file with different record length).
Is there any way within JCL - just for testing - to know ABENDCC of last step. I can not just use RC12 as it is too generic.
Apologies if the query is strange and Thanks in anticipation. |
|
Back to top |
|
|
dneufarth
Active User
Joined: 27 Apr 2005 Posts: 420 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
What about solving the different length problem first? |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2135 Location: USA
|
|
|
|
Search in Google (or RTFM):
“JCL IF statement” |
|
Back to top |
|
|
Nileshkul
New User
Joined: 09 May 2016 Posts: 43 Location: India
|
|
|
|
Thanks for replies.
Just to clarify - I am not getting U0** error code in testing since it seems assigned by scheduler when it run by scheduler and if I test job with my own id, it just returns just RC12. So I need to know what is ABENDCC in this specific case. So Is there any way to know ABENDCC of step executed in JCL. I agree IF/THEN statements would help but that is after the ABENDCC is known to handle it like 'IF STEP30.ABENDCC = U0** THEN'
Please help on this, Thanks in anticipation. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2135 Location: USA
|
|
|
|
In any case, you would not be able to handle hundreds, or thousands of possible ABEND codes automatically, within the same job.
If you are able to handle 1-3-5 of them, you can check for these specific ones in the // IF (step.ABENDCC= ??) statement(s), and then call your ABEND handler.
For all other ABENDs you can either use a general step with // IF (step.ABEND), or just leave it as is, to be analyzed manually as unexpected program behavior.
My opinion: your goal doesn't worth the required efforts. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 730 Location: Denmark
|
|
|
|
Not JCL, but you can use the REXX API to scan output from the current job and extract the abend/return codes that way. |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1329 Location: Bamberg, Germany
|
|
|
|
You can also access the Job info until to the point where some REXX is run. AFAIKT it does not yet take care for User and System ABENDs, but such things exist. |
|
Back to top |
|
|
|