Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to referback a proc step's return code?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to referback a proc step's return code?
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: 1439
Location: Bangalore,India

PostPosted: Fri Jun 29, 2007 2:19 pm    Post subject:
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    Post subject: Re: How to referback a proc step's return code?
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: 1439
Location: Bangalore,India

PostPosted: Fri Jun 29, 2007 2:44 pm    Post subject:
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    Post subject: Re: How to referback a proc step's return code?
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

Active Member


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

PostPosted: Fri Jun 29, 2007 5:33 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to Capture the Max return code of... anilkumar922 All Other Mainframe Topics 0 Thu Jan 12, 2017 12:02 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts IDEAL - Code Retrieval yugendran CA Products 0 Fri Nov 25, 2016 3:27 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us