Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 965
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 Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Speed-up/reduce CPU use of code prino PL/I & Assembler 0 Tue Sep 26, 2017 12:05 am
No new posts it is possible output a SET value fro... Martylin JCL & VSAM 5 Fri Sep 22, 2017 7:08 am
No new posts LIBDEF not working in called proc packerm CLIST & REXX 0 Fri Sep 15, 2017 7:22 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us