IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Query regading linkage section data.


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Amsar

New User


Joined: 26 Sep 2008
Posts: 84
Location: Chennai

PostPosted: Sat Apr 11, 2009 12:59 am
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Sat Apr 11, 2009 1:03 am
Reply with quote

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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Sat Apr 11, 2009 1:05 am
Reply with quote

A quick search of "PARM COBOL" turned this up.....
how to pass variable length dynamically in cobol
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Apr 11, 2009 1:07 am
Reply with quote

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
View user's profile Send private message
Amsar

New User


Joined: 26 Sep 2008
Posts: 84
Location: Chennai

PostPosted: Sat Apr 11, 2009 1:22 am
Reply with quote

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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Sat Apr 11, 2009 1:45 am
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Sat Apr 11, 2009 2:52 am
Reply with quote

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
View user's profile Send private message
Amsar

New User


Joined: 26 Sep 2008
Posts: 84
Location: Chennai

PostPosted: Sat Apr 11, 2009 2:58 pm
Reply with quote

Thanks All for your suggestion. icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts How to save SYSLOG as text data via P... All Other Mainframe Topics 4
No new posts Store the data for fixed length COBOL Programming 1
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
Search our Forums:

Back to Top