View previous topic :: View next topic
|
Author |
Message |
aripallig
New User
Joined: 05 Jul 2005 Posts: 23 Location: india
|
|
|
|
Hi All,
here i have doubt in JCL,
Step1 is going to return the return code which i am not sure what it is going to give.
But in step2 i need to read the return code of the step1 and need to pass that value to the cobol pgm which is in the next step and need to run the Step2.
Could some one help me how we can pass the return code of the JCL to the Application program.
Thanks,
Girish A |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
But in step2 i need to read the return code of the step1 and need to pass that value to the cobol pgm |
A redesign is needed. . .
What is step1?
JCL can act on the condition code set by a prior step, but it is not available to an applicaton program. |
|
Back to top |
|
|
aripallig
New User
Joined: 05 Jul 2005 Posts: 23 Location: india
|
|
|
|
Hi Dick,
Thanks for your information, i had this as an interview question.
They asked me if we can pass the return code from previous step of the JCL to Program of the next step. so that based on the return code we need to execute the step2.
Thanks,
Girish A |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
I believe you misunderstood the queston. . .
Quote: |
so that based on the return code we need to execute the step2. |
This is the normal way to use a condition code.
It has nothing to do with getting the return code into the program. The condition code test is coded in the jcl and will control execution of a cobol program or a utility program (anything that is executed by PGM=).
You need to understand that this is a function of jcl rather than code.
At the top of the page is a link to "IBM Manuals" where you will find the JCL Language RFeference. Suggest you read the complete info about COND. |
|
Back to top |
|
|
aripallig
New User
Joined: 05 Jul 2005 Posts: 23 Location: india
|
|
|
|
Hi Dick,
Thanks for your time in providing me the reply.
Thanks,
Girish A |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome - good luck
d |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
aripallig wrote: |
Step1 is going to return the return code which i am not sure what it is going to give.
But in step2 i need to read the return code of the step1 and need to pass that value to the cobol pgm which is in the next step and need to run the Step2. |
Probably, you can write a REXX to capture the RC of Step1. Write that in a file and read this file in your COBOL-program? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hi Anuj,
Why even attempt this if all that is needed is conditional execution of step2?
We probably need a better definition of what is really wanted. . . |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
could you not use some IF/THEN/ELSE/END-IF constructs
to SET a symbolic
which would be a 'parm' for the COBOL program?
or can you not SET symbolics during the execution of a JOB? |
|
Back to top |
|
|
|