If the MAP compile option is used, the compiler includes a storage offset listing in the compiler listing. This listing gives the location in storage of the following level-1 variables if they are used in the program:
The listing may also include some compiler generated temporaries.
For an AUTOMATIC variable with adjustable extents, there will be two entries in this table:
For STATIC and CONTROLLED variables, the storage location will depend on the RENT/NORENT compiler option, and if the NORENT option is in effect, the location of CONTROLLED variables will also depend on the WRITABLE/NOWRITABLE compiler option.
The first column in the Storage Offset Listing is labeled IDENTIFIER and holds the name of the variable whose location appears in the fourth column.
The second column in the Storage Offset Listing is labeled DEFINITION and holds a string in the format "B-F:N" where
You can find the name of the block corresponding to this block number in the Block Name List which will proceed the Storage Offset Listing (and the Pseudo Assembly Listing, if any)
You can find the name of the file corresponding to this file number in the File Reference Table which will appear very near the end of the entire compilation listing.
The third column in the Storage Offset Listing is labeled ATTRIBUTES and indicates the storage class of the variable.
The fourth column in the Storage Offset Listing is unlabeled and tells how to find the location of the variable.
This storage offset listing is sorted by block and by variable name, and it also includes only user variables. However, specifying the MAP option also causes the compiler to produce
The PL/L language's mapping rules may require that a structure be offset by up to 8 bytes from where it would seem to start. For example. consider the AUTOMATIC structure A declared as
dcl
1 A,
2 B char(2),
2 C fixed bin(31);
Since C must be aligned on a 4-byte boundary, 2 bytes of padding will be needed for this structure. However, PL/I places those 2 bytes not after B, but before B. These 2 bytes of "padding" before a structure starts are referred to as the "hang bytes" for the structure.
These hang bytes will also be reflected in the "automatic map" generated by the compiler. While the "storage offset listing" would show the offset and length for A without including its hang bytes
A Class = automatic, Location = 186 : 0xBA(r13), Length = 6
the "automatic map" would show the offset and length for A with its hang bytes included
OFFSET (HEX) LENGTH (HEX) NAME
98 8 #MX_TEMP1
A0 18 _Sfi
B8 8 A
Finally, note that since the maximum alignment stringency for a field in a structure is 8-byte alignment and the minimum size of a field is one bit, the largest possible hang would consist of 7 bytes and 7 bits - as would be the case for the following structure
dcl
1 X,
2 Y bit(1),
2 Z float bin(53);