Pathway/iTS SCREEN COBOL Reference Manual (G06.24+, H06.03+, Pathway/iTS 1.0+)

Data Division
Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual426750-001
5-3
Linkage Section
An 01 level data item can have a maximum size of 32,000 bytes and can comprise
elementary and/or group items. For example:
WORKING-STORAGE SECTION.
01 BIG-01-ITEM PIC X(32000) VALUE SPACES.
01 BIG-GROUP-ITEM-1.
03 BIG-GROUP. PIC X(16000) VALUE SPACES.
01 BIG-GROUP-ITEM-2.
03 BIG-GROUP.
05 BIG-ITEM-2-A. PIC X(16000) VALUE SPACES.
05 BIG-ITEM-2-B. PIC X(16000) VALUE SPACES.
01 BIG-ELEMENTARY-ITEM-01.
03 BIG-ELEMENTARY-GROUP.
05 BIG-ELEMENTARY-ITEM PIC X(32000) VALUE SPACES.
Linkage Section
The Linkage Section describes data passed from the calling program to the program
containing the Linkage Section (the called program). The Linkage Section associates
the data items defined in the section with data items defined in the Working-Storage
Section of the calling program. A Linkage Section is required in a called program even
when no data is passed.
The section begins with a section header. The format of the header is:
Definitions in the Linkage Section should be the same size as the corresponding items in
the Working-Storage Section of the calling program. If the definitions are larger, then an
error is returned; if the definitions are smaller, then data might be truncated but no error
is returned.
The calling program must contain a USING clause in the CALL statement to refer to the
data structures to be passed to the called program. The called program must contain a
USING clause in the Procedure Division header to refer to the data structures being
passed to it.
The Linkage Section does not cause the system to allocate additional memory in the
called program. The called and calling programs share the calling program's memory
for the common data structures.
The structure of the Linkage Section is the same as that of the Working-Storage Section
except the VALUE clause is prohibited for items other than level 88 items.
The maximum size of elementary items, group items, and 01 level data items in the
Linkage Section is 32,000 bytes. The maximum size of a data item that contains only
double-byte characters is 16,000 double-byte characters (32,000 bytes) for a Linkage
Section entry. A more detailed explanation of this size limit is provided in the
subsection SCREEN COBOL Limits
on page 7-19.
Note. When very large data items are displayed using the Compaq Inspect debugging tool,
truncation might occur.
LINKAGE SECTION.