DATAMAP

Causes the Compiler to output information on data items.

Syntax:

>>-.---.-.--------DATAMAP-.----------.--.---><
   +-/-+ |                +-(option)-+  |
         +-NO-DATAMAP-------------------+

Parameters:

option
Displays the Address column or the Offset column as part of the data item information.
ADDR
Displays the Address column, which shows the address of the data item, as an offset from the beginning of the program's data area. This option is only applicable to native code.
OFFSET
Displays the Offset column, which shows the offset value of each data item from the beginning of its 01 level group.

Properties:

Default: NODATAMAP
Phase: Syntax check
$SET: Initial

Dependencies:

DATAMAP(OFFSET) is automatically set when compiling to managed code when you specify DATAMAP without any parameters.

DATAMAP(ADDR) is automatically set when compiling to native code when you specify DATAMAP without any parameters.

Comments:

This directive causes the check phase of the Compiler to output information on the data items; both those that you have specified, and those automatically generated by the Compiler, such as the data area for the RETURN-CODE special register.

The information is output at the end of the list file. The information on the data items is output in the same order as the items are encountered in your program by the Compiler. The first line is the program-id of the program to which the data items belong. For each data item, the following information is listed:

  • The line number
  • The data name
  • The address or offset of the data item; see the option parameters
  • The size of the data item in bytes
  • The attributes of the data item. This consists of a string in the following format:

    ss xxxx cccccccccc R E G

    where the variables are:

    ss
    Location of data item. This can be:
    IO Input-Output Section
    FD File Description
    WS Working-Storage Section
    TL Thread-Local-Storage Section
    OS Object-Storage Section
    LC Local-Storage Section
    LS Linkage Section
    RD Report Section
    SS Screen Section
    PG Variables, such as special registers, generated by the Compiler check phase
    PD Temporary variables, such as those used in search statements, generated by the Procedure Division
    xxxx
    Can be:
    G Group item
    GO Group occurs item
    GSO Group sub occurs item
    E Elementary item
    EO Elementary occurs item
    ESO Elementary sub occurs item
    ESOO Elementary sub occurs occurs item
    cccccccccc
    A description of the data type; for example, Display, Comp, Comp-3, Numeric E (for Numeric Edited), AlphNum J (for AlphaNumeric Justified), and so on
    R
    The item is a Redefinition of some other data item
    E
    The data item is an External data item
    G
    The data item is a Global data item