The following table shows the contents of the symbol record.
| Field | Size | Description |
|---|---|---|
| Symbol ID | FL4 | Unique ID of symbol |
| Line number | FL4 | The listing line number of the source record in which the symbol is defined or declared |
| Level | XL1 | True level-number of symbol (or relative level-number of a data item within a structure). For COBOL, this can be in the range 01-49, 66 (for RENAMES items), 77, or 88 (for condition items). |
| Qualification indicator | XL1 |
|
| Symbol type | XL1 |
The following are ORed into the above types, when applicable:
|
| Symbol attribute | XL1 |
|
| Clauses | XL1 | Clauses specified in
symbol definition.
For symbols that have a symbol attribute of Numeric (X'01'), Elementary character (X'02'), Group (X'03'), Pointer (X'04'), Index data item (X'05'), or Object reference (X'18'):
For both file types:
|
For mnemonic-name
symbols:
|
||
| Data flags 1 | XL1 | For both file types, and
for symbols that have a symbol attribute of
Numeric (X'01'), Elementary character (X'02'),
Group (X'03'), Pointer (X'04'),
Index data item (X'05'), or Object reference (X'18'):
|
| Data flags 2 | XL1 | For symbols that
have a symbol attribute of Numeric (X'01'):
For symbols that have a symbol attribute of Elementary character (X'02') or Group (X'03'):
|
For both file types:
Field will be zero for all other data types. |
||
| Data flags 3 | XL1 | For both file types:
Field will be zero for all other data types. |
| File organization | XL1 | For both file types:
Field will be zero for all other data types. |
| USAGE clause | FL1 |
|
| Sign clause | FL1 |
|
| Indicators | FL1 |
|
| Size | FL4 | The size of this data item. The actual number of bytes this item occupies in storage. If a DBCS item, the number is in bytes, not characters. For variable-length items, this field will reflect the maximum size of storage reserved for this item by the compiler. Also known as the "Length attribute." |
| Precision | FL1 | The precision of a fixed or float data item |
| Scale | FL1 | The scale factor of a fixed data item. This is the number of digits to the right of the decimal point. |
| Base locator type | FL1 | For host:
For Windows and AIX:
|
| Date format | FL1 | Date format:
|
| Data flags 4 | XL1 | For symbols that
have a symbol attribute of Numeric (X'01'):
For symbols that have a symbol attribute of Elementary character (X'02'):
For symbols that have a symbol attribute of Group (X'03'):
|
| Reserved | FL3 | Reserved for future use |
| Addressing information | FL4 | For host, the Base
Locator number and displacement:
For Windows and AIX, the W-code SymId. |
| Structure displacement | AL4 | Offset of symbol within structure. This offset is set to 0 for variably located items. |
| Parent displacement | AL4 | Byte offset from immediate parent of the item being defined. |
| Parent ID | FL4 | The symbol ID of the immediate parent of the item being defined. |
| Redefined ID | FL4 | The symbol ID of the data item that this item redefines, if applicable. |
| Start-renamed ID | FL4 | If this item is a level-66 item, the symbol ID of the starting COBOL data item that this item renames. If not a level-66 item, this field is set to 0. |
| End-renamed ID | FL4 | If this item is a level-66 item, the symbol ID of the ending COBOL data item that this item renames. If not a level-66 item, this field is set to 0. |
| Program-name symbol ID | FL4 | ID of the program-name of the program or the class-name of the class where this symbol is defined. |
| OCCURS minimum
Paragraph ID |
FL4 | Minimum value for OCCURS
Proc-name ID for a paragraph-name |
| OCCURS maximum
Section ID |
FL4 | Maximum value for OCCURS
Proc-name ID for a section-name |
| Dimensions | FL4 | Number of dimensions |
| Case bit vector | XL4 | The case of the characters in the symbol name is
represented with one bit per character. Each bit has the following
meaning:
Bit 0 represents the case of the first character, bit 1 represents the case of the second character, and so forth. |
| Reserved | CL8 | Reserved for future use |
| Value pairs count | HL2 | Count of value pairs |
| Symbol name length | HL2 | Number of characters in the symbol name |
| Picture data length for
data-name
or Assignment-name length for file-name |
HL2 | Number of characters in
the picture data; zero if symbol has no associated PICTURE clause.
(Length of the PICTURE field.)
Length represents the field as it is found
in the source input.
This length does not represent the expanded
field for PICTURE items that contain a replication factor.
The
maximum COBOL length for a PICTURE string is 50 bytes.
Zero in this field indicates
no PICTURE specified.
Number of characters in the external file-name if this is a file-name. This is the DD name part of the assignment-name. Zero if file-name and ASSIGN USING specified. |
| Initial Value length for
data-name
External class-name length for CLASS-ID |
HL2 | Number of characters in
the symbol value; zero if symbol has no initial value
Number of characters in the external class-name for CLASS-ID |
| ODO symbol name ID for
data-name
ID of ASSIGN data-name if file-name |
FL4 | If data-name, ID of the
ODO symbol name; zero if ODO not specified
If file-name, Symbol-ID for ASSIGN USING data-name; zero if ASSIGN TO specified |
| Keys count | HL2 | The number of keys defined |
| Index count | HL2 | Count of Index symbol IDs; zero if none specified |
| Symbol name | CL(n) | |
| Picture data string for
data-name
or Assignment-name for file-name |
CL(n) | The PICTURE character string
exactly as the user types it in.
The character string
includes all symbols, parentheses, and replication factor.
The external file-name if this is a file-name. This is the DD name part of the assignment-name. |
| Index ID list | (n)FL4 | ID of each index symbol name |
| Keys | (n)XL8 | This field contains data describing keys specified for an array. The following three fields are repeated as many times as specified in the 'Keys count' field. |
| ...Key Sequence | FL1 | Ascending or descending
indicator.
|
| ...Filler | CL3 | Reserved |
| ...Key ID | FL4 | The symbol ID of the data item that is the key field in the array |
| Initial Value data for
data-name
External class-name for CLASS-ID |
CL(n) | This field contains the
data specified in the INITIAL VALUE clause for this symbol.
The following four
subfields are repeated according to the count in the 'Value pairs
count' field.
The total length of the data in this field is
contained in the 'Initial value length' field.
The external class-name for CLASS-ID. |
| ...1st value length | HL2 | Length of first value |
| ...1st value data | CL(n) | 1st value.
This field contains the literal (or figurative constant) as it is specified in the VALUE clause in the source file. It includes any beginning and ending delimiters, embedded quotation marks, and SHIFT IN and SHIFT OUT characters. If the literal spans multiple lines, the lines are concatenated into one long string. If a figurative constant is specified, this field contains the actual reserved word, not the value associated with that word. |
| ...2nd value length | HL2 | Length of second value, zero if not a THRU value pair |
| ...2nd value data | CL(n) | 2nd value.
This field contains the literal (or figurative constant) as it is specified in the VALUE clause in the source file. It includes any beginning and ending delimiters, embedded quotation marks, and SHIFT IN and SHIFT OUT characters. If the literal spans multiple lines, the lines are concatenated into one long string. If a figurative constant is specified, this field contains the actual reserved word, not the value associated with that word. |