Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
how to store return code in temporary variable

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Other Mainframe Topics
Author Message
hemav

New User


Joined: 17 Apr 2008
Posts: 3
Location: vizag

PostPosted: Thu Apr 17, 2008 1:20 pm    Post subject: how to store return code in temporary variable
Reply with quote

Hi! I am getting Return code from cobol program and i am using it in jcl.
I want to store the return code in temporary variable.
Back to top
View user's profile Send private message
References
PostPosted: Thu Apr 17, 2008 1:20 pm    Post subject: Re: how to store return code in temporary variable Reply with quote

Moved: Thu Apr 17, 2008 2:24 pm by superk From Mainframe COBOL to Other Mainframe Topics
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 2921
Location: Charlotte,NC USA

PostPosted: Thu Apr 17, 2008 2:32 pm    Post subject: Reply to: how to store return code in temporary variable
Reply with quote

You will need to retrieve the value of the return-code register from the Job Step Control Block (JSCB) within the MVS control blocks. Search this forum or the Internet for program examples.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 2921
Location: Charlotte,NC USA

PostPosted: Thu Apr 17, 2008 2:44 pm    Post subject: Reply to: how to store return code in temporary variable
Reply with quote

I just re-read your topic. What do you mean by a "temporary variable"? There is not such construct in JCL.
Back to top
View user's profile Send private message
hemav

New User


Joined: 17 Apr 2008
Posts: 3
Location: vizag

PostPosted: Thu Apr 17, 2008 2:48 pm    Post subject:
Reply with quote

I want to use the Return code in next steps.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 2921
Location: Charlotte,NC USA

PostPosted: Thu Apr 17, 2008 2:59 pm    Post subject: Reply to: how to store return code in temporary variable
Reply with quote

You can check the value of a return-code from any job step anywhere within your job. What would be the purpose of storing it (you'd have to write its value into a dataset)?
Back to top
View user's profile Send private message
hemav

New User


Joined: 17 Apr 2008
Posts: 3
Location: vizag

PostPosted: Thu Apr 17, 2008 3:01 pm    Post subject:
Reply with quote

I'm using GDG file as a input. Depending on the return code I want to use the particular generation.
Back to top
View user's profile Send private message
Moved: Thu Apr 17, 2008 5:46 pm by superk From Other Mainframe Topics to Off Topics
dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 6033
Location: 221 B Baker St

PostPosted: Thu Apr 17, 2008 10:17 pm    Post subject:
Reply with quote

Hello hemalatha and welcome to the forums,

Quote:
I want to store the return code in temporary variable.
Similar to what you could do in unix? JCL does not have this functionality.

Quote:
I'm using GDG file as a input. Depending on the return code I want to use the particular generation.
The return-code is used to control process flow in a multi-step job. It is not a data item.

I believe the implementation plan needs to be re-visited.

If you elaborate on what your process needs to do we may be able to offer suggestions.
Back to top
View user's profile Send private message
Moved: Thu Apr 17, 2008 10:17 pm by dick scherrer From Off Topics to Other Mainframe Topics
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 709
Location: Virginia, USA

PostPosted: Thu Apr 17, 2008 10:20 pm    Post subject:
Reply with quote

The return code from any previous step in the job is available for the remainder of the job. Look in JCL manuals above.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 2921
Location: Charlotte,NC USA

PostPosted: Thu Apr 17, 2008 11:45 pm    Post subject: Reply to: how to store return code in temporary variable
Reply with quote

I had PM'd the O/P to see if he got what he needed out of this topic, or if there was more to it. I've not received a reply as of yet.
Back to top
View user's profile Send private message
dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 6033
Location: 221 B Baker St

PostPosted: Fri Apr 18, 2008 3:31 am    Post subject: Reply to: how to store return code in temporary variable
Reply with quote

Nor here icon_wink.gif

My guess is that there is a far better way to meet the requirement, but we need to know what the requirement actually is. . .

d
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1