COBOL Manual for TNS and TNS/R Programs

Issues Related to Binding and Linking
HP COBOL Manual for TNS and TNS/R Programs522555-006
24-21
Designing Programs With Large Amounts of Data
Designing Programs With Large Amounts of
Data
For TNS programs, the address-space limitation is 128 KB. TNS HP COBOL reserves
the upper 64 KB of the address space for its own use and reserves some of the lower
64 KB also. If the space reserved for your program data (user data space) is not
enough, you can put some data in the Extended-Storage Section (user extended
space). You can also reduce code size with the directive LESS-CODE 1, but at the
expense of program execution time.
The data space limit of approximately 60 KB sections of a TNS process does not apply
to native HP COBOL programs. The Working-Storage Section and the Extended-
Storage Section are the same in native HP COBOL. There is a limit on what is called
the “small data space,” but you can avoid that limit by using the directive LARGEDATA.
Topics:
Extended-Storage Section
LESS-CODE Directive
Extended-Storage Section
For TNS programs, data declared in the Extended-Storage Section is stored in user
extended space. The main HP COBOL program statically allocates a single segment of
user extended space in which the Extended-Storage Sections of the component
HP COBOL programs are consolidated. The size of user extended space is the sum of
the sizes of the Extended-Storage Sections of the component programs, plus some
space that the HP COBOL run-time environment allocates and manages. The
maximum size of the segment that the main HP COBOL program allocates is
134,217,726 bytes.
When declaring data in the Extended-Storage Section, be aware that:
Instructions that operate on items in the Extended-Storage Section take somewhat
more execution time and storage space.
An individual data item in the Extended-Storage Section (including a record)
cannot exceed 134,217,726 bytes.
A table in the Extended-Storage Section cannot exceed 134,217,726 bytes,
because it must be contained within a record.
Note. This topic applies only to TNS programs.
Native HP COBOL does not need an Extended-Storage Section. The NMCOBOL compiler
handles any data items that are described in the Extended-Storage Section as if they were
described in the Working-Storage Section.