Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Query regading linkage section data.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Query regading linkage section data.
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: 7931
Location: Bellevue, IA

PostPosted: Sat Apr 11, 2009 1:03 am    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Sat Apr 11, 2009 1:05 am    Post subject:
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

Site Director


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

PostPosted: Sat Apr 11, 2009 1:07 am    Post subject:
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    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Sat Apr 11, 2009 1:45 am    Post subject:
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: 7931
Location: Bellevue, IA

PostPosted: Sat Apr 11, 2009 2:52 am    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Join in SQL Query vickey_dw DB2 0 Tue Jan 17, 2017 12:15 am
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
This topic is locked: you cannot edit posts or make replies. MQ setup query mohitsaini Java & MQSeries 4 Sun Jan 08, 2017 1:53 am
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us