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: 8002
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: 8002
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 Data replication from multiple Db2 ta... kishpra DB2 5 Mon Mar 27, 2017 9:58 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am


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