| Author |
Message |
hemav
New User
Joined: 17 Apr 2008 Posts: 3 Location: vizag
|
|
|
|
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 |
|
 |
References
|
Posted: Thu Apr 17, 2008 1:20 pm Post subject: Re: how to store return code in temporary variable |
 |
|
|
 |
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
|
|
|
|
| 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 |
|
 |
superk
Moderator Team Head
Joined: 26 Apr 2004 Posts: 2921 Location: Charlotte,NC USA
|
|
|
|
| I just re-read your topic. What do you mean by a "temporary variable"? There is not such construct in JCL. |
|
| Back to top |
|
 |
hemav
New User
Joined: 17 Apr 2008 Posts: 3 Location: vizag
|
|
|
|
| I want to use the Return code in next steps. |
|
| Back to top |
|
 |
superk
Moderator Team Head
Joined: 26 Apr 2004 Posts: 2921 Location: Charlotte,NC USA
|
|
|
|
| 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 |
|
 |
hemav
New User
Joined: 17 Apr 2008 Posts: 3 Location: vizag
|
|
|
|
| I'm using GDG file as a input. Depending on the return code I want to use the particular generation. |
|
| Back to top |
|
 |
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
|
|
|
|
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 |
|
 |
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
|
|
|
|
| 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 |
|
 |
superk
Moderator Team Head
Joined: 26 Apr 2004 Posts: 2921 Location: Charlotte,NC USA
|
|
|
|
| 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 |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 6033 Location: 221 B Baker St
|
|
|
|
Nor here
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 |
|
 |
|
|