View previous topic :: View next topic |
Author |
Message |
pleonard Beginner
Joined: 19 May 2010 Posts: 2 Topics: 1
|
Posted: Wed May 19, 2010 11:43 am Post subject: How to force an abend in JCL based in prior steps |
|
|
I need to force an abend maybe using ABENDCC parameter if any prior step finish with RC > 16. For example:
//STEP1 EXEC PGM=A
//STEP2 EXEC PGM=B
//IFRCGT0 IF (RC > 16) THEN
needs to abend with U0127
// ENDIF
Thanks
Paulo |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Wed May 19, 2010 11:47 am Post subject: |
|
|
pleonard,
What is user abend U0127?
kolusu |
|
Back to top |
|
|
pleonard Beginner
Joined: 19 May 2010 Posts: 2 Topics: 1
|
Posted: Wed May 19, 2010 11:50 am Post subject: |
|
|
just my user abend. Could be any number (I guess). |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Wed May 19, 2010 1:29 pm Post subject: |
|
|
pleonard,
Run this program to abend. The program will abend with ABEND=S000 U0016 REASON=00000000
Code: |
IDENTIFICATION DIVISION.
PROGRAM-ID. USERAB
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 W-CEE3ABD PIC X(08) VALUE 'CEE3ABD'.
01 W-ABEND-CODE PIC S9(9) COMP VALUE 16.
01 W-CLEAN-UP PIC S9(9) COMP VALUE 1.
PROCEDURE DIVISION.
CALL W-CEE3ABD USING W-ABEND-CODE, W-CLEAN-UP
GOBACK
.
|
Kolusu |
|
Back to top |
|
|
papadi Supermod
Joined: 20 Oct 2009 Posts: 594 Topics: 1
|
Posted: Wed May 19, 2010 7:30 pm Post subject: |
|
|
If you modify that code to use a parm, you could generate different User abend codes for different requirements. . .
If the parm is missing or invalid generate the default U0016 abend. Otherwise, generate the specified Unnnn abend. . . _________________ All the best,
di |
|
Back to top |
|
|
rlilley Beginner
Joined: 05 Apr 2010 Posts: 19 Topics: 3
|
Posted: Wed May 19, 2010 8:22 pm Post subject: How to force an abend in JCL based in prior steps |
|
|
File 233 on the CBT contains a program GBHABEND which will do exactly what you need. The parm controls the number of the USER abend
http://www.cbttape.org/cbtdowns.htm |
|
Back to top |
|
|
|
|