Home > Software > Mainframe > Cobol
Interview Questions   Tutorials   Discussions   Programs   

Cobol - What is the purpose of linkage section?

asked mar August 3, 2014 01:51 AM  

What is the purpose of linkage section?


1 Answers

answered By Mswami   0  
It is used to access the data that are external to the program. JCL can send maximum 100 characters to a program thru PARM. Linkage section MUST be coded with a half word binary field, prior to actual field. If length field is not coded, the first two bytes of the field coded in the linkage section will be filled with length and so there are chances of 2 bytes data truncation in the actual field.

The linkage section is part of a called program that 'links' or maps to data items in the calling program's working storage.  It is the part of the called program where these share items are defined.

Example: 01 LK-DATA. 05 LK-LENGTH PIC S9(04) COMP. 05 LK-VARIABLE PIC X(08).

   add comment

Your answer

Join with account you already have



Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!