View previous topic :: View next topic
|
Author |
Message |
Amsar
New User
Joined: 26 Sep 2008 Posts: 84 Location: Chennai
|
|
|
|
I want some information regarding the linkage data. I'm passing parms in COBOL program though the JCL. Will I be able to receive the same parms in the calling program with linkage section though the JCL?
Thanks,
Amsarl |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
Your question is not at all clear. Are you asking if you have a COBOL program calling a program and you want to pass a parameter to the calling program through a JCL parameter, do you need a LINKAGE SECTION? The answer to that is yes. If you're asking about calling a program from within COBOL and passing the JCL parameter to the called program, you must get the parameter in the calling program -- the called program will only have access to the data passed by the calling program. If you're asking something else, please clarify what you want to know. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Can i will be able to receive the same parm in calling program with linkage section though jcl? |
If i understand your question, no.
The program named in the jcl can see the jcl parm. To use that parm in some called module, the parm would be passed to the called module with the "CALL mod USING. . .".
If that is not your question, please clarify. |
|
Back to top |
|
|
Amsar
New User
Joined: 26 Sep 2008 Posts: 84 Location: Chennai
|
|
|
|
Hi Robert,
Quote: |
the called program will only have access to the data passed by the calling program |
I have main program A which is receiving a data in his linkage section through JCLS parms, B is the subprogram called by A.
My query is that instead of sending the linkage data from A (Received from Jcl parm) into B, directly can i access the parms in jcl in linkage section of my called program B.
But from all your reply i understood that i cant do like that. Correct me if i am wrong?
Thanks,
Amsar |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Instead of
Call B using B-passed-data
use
Call B using A-parm-area B-passed-data.
As long as you keep passing it, it will be there. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
As CICS Guy says, what you pass to the called program is what it can get to. If you pass the JCL parm, it'll be there. If you don't, you can't get to it. |
|
Back to top |
|
|
Amsar
New User
Joined: 26 Sep 2008 Posts: 84 Location: Chennai
|
|
|
|
Thanks All for your suggestion. |
|
Back to top |
|
|
|