Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 8165
Location: East Dubuque, Illinois, USA

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: 8165
Location: East Dubuque, Illinois, USA

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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
No new posts HEX value search in a DB2 query maxsubrat DB2 2 Wed Oct 04, 2017 3:04 pm
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us