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
 

 

Moving working storage section data to Linkage section data

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
vamseepotti

New User


Joined: 21 Oct 2003
Posts: 45

PostPosted: Wed Oct 19, 2005 6:31 pm    Post subject: Moving working storage section data to Linkage section data
Reply with quote

One doubt regarding Linkage section. Can we move working storage section data to Linkage section data. If posible how can we code the program.
Back to top
View user's profile Send private message

Sridevi_C

Active User


Joined: 22 Sep 2005
Posts: 104
Location: Concord, New Hampshire, USA.

PostPosted: Wed Oct 19, 2005 8:49 pm    Post subject:
Reply with quote

Main program's working storage section variable's contents are moved to the sub program's linkage section variables(ie.,parameter passing using CALL). Linkage section can also get value through PARM parameter.
Main pgm:
WORKING-STORAGE SECTION.
77 A PIC 9 VALUE 9.
77 B PIC 9 VALUE 8.
77 C PIC 99.
PROCEDURE DIVISION.
PARA.
....
CALL SUB USING A,B,C.
DISPLAY C.
.....
Sub pgm:
LINKAGE SECTION.
77 X PIC 9.
77 Y PIC 9.
77 Z PIC 99.
PROCEDURE DIVISION USING X,Y,Z.
....
COMPUTE Z = X - Y.
.....
output:1
Also if the sub pgm has working storage variables by itself then those values can be moved to it's own linkage section variables (though automatically it receives value from the calling pgm)during calculation.
I hope it doesn't confuse...
Regards,
Sridevi
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 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
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am


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