MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to force an abend in JCL based in prior steps

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
pleonard
Beginner


Joined: 19 May 2010
Posts: 2
Topics: 1

PostPosted: Wed May 19, 2010 11:43 am    Post subject: How to force an abend in JCL based in prior steps Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Wed May 19, 2010 11:47 am    Post subject: Reply with quote

pleonard,

What is user abend U0127?

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
pleonard
Beginner


Joined: 19 May 2010
Posts: 2
Topics: 1

PostPosted: Wed May 19, 2010 11:50 am    Post subject: Reply with quote

just my user abend. Could be any number (I guess).
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Wed May 19, 2010 1:29 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
papadi
Supermod


Joined: 20 Oct 2009
Posts: 594
Topics: 1

PostPosted: Wed May 19, 2010 7:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
rlilley
Beginner


Joined: 05 Apr 2010
Posts: 19
Topics: 3

PostPosted: Wed May 19, 2010 8:22 pm    Post subject: How to force an abend in JCL based in prior steps Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group