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: 968
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 CICS web service from DB2 Triggers or... kiranprasad DB2 1 Wed Dec 20, 2017 11:10 am
No new posts IBEGENER RETURN CODE 12 anilkumar922 All Other Mainframe Topics 5 Wed Dec 13, 2017 11:41 am
No new posts Finding the plan when code compiled u... Ahemad DB2 1 Fri Dec 01, 2017 6:38 pm
No new posts Strange Code amitc23 COBOL Programming 6 Tue Nov 28, 2017 11:25 am
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am

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