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

New User


Joined: 06 Apr 2021
Posts: 85
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
Warnings : 2

Senior Member


Joined: 29 Apr 2008
Posts: 1413

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

New User


Joined: 06 Apr 2021
Posts: 85
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
Warnings : 1

Senior Member


Joined: 07 Feb 2009
Posts: 1275
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

New User


Joined: 06 Apr 2021
Posts: 85
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: 356
Location: Inside the SPEW (Cincinnati OH 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 IEF142I and Cond. Code 12 All Other Mainframe Topics 3
No new posts IBM CODE PAGES IBM Tools 0
No new posts Calling COBOL DB2 program from a COBO... COBOL Programming 2
No new posts File Status Error code 39 when Proces... COBOL Programming 2
This topic is locked: you cannot edit posts or make replies. Internal Autonomous Stored Procedure ... DB2 6
Search our Forums:

Back to Top