View previous topic :: View next topic
|
Author |
Message |
gopiCognznt
New User
Joined: 15 Dec 2008 Posts: 2 Location: Chennai
|
|
|
|
Hi,
I have question on using the procs.
Suppose I have jcl with the 2 procs and I don't to execute the 2nd proc, if any of the step in my 1st proc abended.
EX : JCL HAVING 2 PROCs PROC1 & PROC2
PROC 1 having a step1, step2, step3
if the step3 of the proc abended, I dont want to execute the proc.
I would be really happy, if someone post an answer to me.
Thanks
Gopi |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
What COND or IF/THEN/ELSE logic have you tried so far? What were the results? |
|
Back to top |
|
|
gopiCognznt
New User
Joined: 15 Dec 2008 Posts: 2 Location: Chennai
|
|
|
|
I tried using IF,
//IFSTRT IF (STEP010.RC EQ 0) THEN
the job abended with JCL error in the jscan itself |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
For us to be able to help, you need to post complete info - not simply post "it didn't work".
Post the complete jcl and the error(s) shown.
When posting use the "Code" tag to preserve alignment and overall make your post more readable.
Make sure to include the message ids as well as the text. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
First of all, you stated that you need to check for an ABEND condition, not a Return-Code condition. If a program abends, it will never set the Return-Code value, so checking for any value for a Return-Code is pointless. You need to be looking at ABEND type condition parameters. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
I think the check you want is:
Code: |
//STEP0001 EXEC PROC1
//*
// IF (ABEND=FALSE) THEN
//STEP0002 EXEC PROC2
// ENDIF
|
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Please post the requested info. . . .
Quote: |
the job abended with JCL error in the jscan itself |
An ABEND and a JCL ERROR are completely different situations.
Until you post what has really happened, this is wasting everyone's time. |
|
Back to top |
|
|
|