IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Cond parameter and Rc code of a procedure.


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Ali_gezer

Active User


Joined: 06 Apr 2021
Posts: 123
Location: argentina

PostPosted: Mon Jan 17, 2022 6:58 pm
Reply with quote

Hello, how are you?
I have a problem with this. I have to check with a step job cond parameter if the ealier step who executes a procedure gives a 2 return code.

Code:

//CHECK1 EXEC ARCHFREE,ARCH='file.example'     
//STEP444  EXEC PGM=ICEGENER,COND=(2,EQ,CHECK1.ARCHFREE)
           


When I do this, I receive a error message in step444.
''10 IEF645I INVALID REFERBACK IN THE COND FIELD ''

this same error happens even if I put (2,EQ,CHECK1) or (2,EQ,ARCHFREE)


Can anybody give me a clue?
Thanks in advance.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2126
Location: USA

PostPosted: Mon Jan 17, 2022 9:12 pm
Reply with quote

Change the reference: instead of procedure name use the step name within that procedure.

FYI: any JCL procedure may include multiple job steps.

BTW: do you know that the parameter COND specifies the condition to skip the job step where it is used, not to allow its execution?
Back to top
View user's profile Send private message
Ali_gezer

Active User


Joined: 06 Apr 2021
Posts: 123
Location: argentina

PostPosted: Mon Jan 17, 2022 9:22 pm
Reply with quote

sergeyken wrote:
Change the reference: instead of procedure name use the step name within that procedure.

FYI: any JCL procedure may include multiple job steps.

BTW: do you know that the parameter COND specifies the condition to skip the job step where it is used, not to allow its execution?


thank you.

//STEP444 EXEC PGM=ICEGENER,COND=(2,EQ,CHECK1.PASO01)

this worked.
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1312
Location: Vilnius, Lithuania

PostPosted: Mon Jan 17, 2022 10:28 pm
Reply with quote

Don't use "COND" anymore, IBM added IF..THEN..ELSE..ENDIF logic about a zillion years ago.
Back to top
View user's profile Send private message
Ali_gezer

Active User


Joined: 06 Apr 2021
Posts: 123
Location: argentina

PostPosted: Mon Jan 17, 2022 10:38 pm
Reply with quote

prino wrote:
Don't use "COND" anymore, IBM added IF..THEN..ELSE..ENDIF logic about a zillion years ago.


yes, I use if but there are people who control the job stream that told us that we have to put the cond parameter this time because if we dont do that the stream is not going to work... something like that.
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 420
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Tue Jan 18, 2022 12:42 am
Reply with quote

Old school way how to understand COND test(s) action
NERTS: any are true, skip (this step)

I sure preferred IF/THEN when it arrived.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts Using the Jobname parameter in a Qual... ABENDS & Debugging 1
Search our Forums:

Back to Top