Data Alignment and Limits on MPE XL [ HP COBOL II/XL Reference Manual ] MPE/iX 5.0 Documentation
HP COBOL II/XL Reference Manual
Data Alignment and Limits on MPE XL
All addresses on MPE XL systems are byte addresses that are aligned in
some way. Addresses divisible by 2 are half-word aligned. Addresses
divisible by 4 are word aligned. A word aligned address is also
half-word aligned and byte aligned. Refer to the HP COBOL II/XL
Programmer's Guide for more information on addressing.
Alignment
By default, HP COBOL II/XL data is aligned in the following way on MPE
XL:
* In the WORKING-STORAGE and FILE sections, level 01 and 77, COMP
SYNCHRONIZED or BINARY SYNCHRONIZED, and index data items are
32-bit-aligned.[REV BEG]
* The first item in WORKING-STORAGE is 64 bit-aligned.
* In the LINKAGE SECTION, all level 01 and 77 items are
8-bit-aligned (byte-aligned) even if the SYNCHRONIZED clause is
specified. The SYNCHRONIZED clause adds slack bytes as if the 01
record began on a 32-bit boundary.[REV END]
The SYNC32 control option does not affect the above, because it specifies
the default.
The SYNC16 control option affects the WORKING-STORAGE and FILE sections
as follows:
* Level 01, 77, and indexed data items are 32-bit-aligned.
* COMP or BINARY SYNCHRONIZED data items are 16-bit-aligned.
The control options OPTFEATURES=LINKALIGNED and OPTFEATURES=LINKALIGNED16
affect only the LINKAGE SECTION.[REV BEG] When you use one of these
options, the compiler assumes that levels 01 and 77 and index data items
(depending on SYNC16/SYNC32) are on 32- and 16-bit[REV END] boundaries,
respectively.
Limits on Data Items
The following are limits on data items:
* The maximum number of data items in any one USING clause of the
CALL statement,[REV BEG] the ENTRY statement, or the PROCEDURE
DIVISION header is 255. Or, the number of data items in these
USING clauses cannot be greater than the total number of 01 and 77
level items defined in the LINKAGE SECTION.
* The maximum number of EXTERNAL data items and files is as follows:
* The sum of the following items must be less than or equal
to 4000:
* The number of EXTERNAL files, multiplied by two.
* The number of EXTERNAL records.
* The maximum number of 01 and 77 level entries permitted in the
LINKAGE SECTION of a subprogram, excluding redefinitions, is 255.
[REV END]
MPE/iX 5.0 Documentation