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

How to referback a proc step's return code?


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

New User


Joined: 12 Jul 2006
Posts: 24

PostPosted: Fri Jun 29, 2007 1:29 pm
Reply with quote

Hi,

I need to refer to the Return code of a step from a previous PROC, in another PROC within the same JCL.

For eg:

The JCL is
Jobstep1 EXEC Proc1
.....
Jobstep2 EXEC Proc2

Proc1:
PS1 EXEC PGM=Program1

If I need to refer to RC from step PS1 of PROC Proc1 in the next PROC Proc 2, how do I give it. AS per the manuals it is to be referred as 'stepname.procstepname.RC' . But when I give as below, I get the error 'DSS8565E - REFERBACK INVALID'.

Proc2:
IF (PS1.Jobstep1.RC = 0)
PS2 EXEC PGM=Program2
ENDIF
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Fri Jun 29, 2007 2:19 pm
Reply with quote

lalitha,

Shouldn't be -

Quote:
jobstep.procstep.rc=0
Back to top
View user's profile Send private message
lalitha_gld

New User


Joined: 12 Jul 2006
Posts: 24

PostPosted: Fri Jun 29, 2007 2:38 pm
Reply with quote

The Syntax given as per the books are :

(stepname.procstepname.RC comparison value) - This is used for testing return code of a particular previous step in a catalogued procedure.

Let me know if there are any limitations in the usage within other procs or something.

Thanks,
Lalitha.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Fri Jun 29, 2007 2:44 pm
Reply with quote

Lalitha,

Quote:
stepname.procstepname.RC comparison value


Please note stepname here represent jobstep name.

In your case -

Code:
JOBSTEP1.PS1.RC=.....
Back to top
View user's profile Send private message
lalitha_gld

New User


Joined: 12 Jul 2006
Posts: 24

PostPosted: Fri Jun 29, 2007 3:49 pm
Reply with quote

Tx for the info, it worked now.
I was confused with the naming, so gave the other way round !

Regards,
Lalitha.
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Fri Jun 29, 2007 5:33 pm
Reply with quote

This always confuses me.

If you have a JCL checker, just try one way and check - it will tell you if wrong.
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 run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
Search our Forums:

Back to Top