Edit formatted mode
The Formatted screen is used to edit the segment occurrences in a database in formatted mode using segment layouts as masks over the data. One segment occurrence per screen and one field per line are displayed on the Formatted screen as shown in the following figure.
Formatted Screen

You can access this screen from the Data Base Location, Unformatted, Index, or Key Specification screen. The segment occurrence shown on the Format screen is always the current segment occurrence in the database.
The UP and DOWN primary commands enable you to scroll through the segment layout while staying fixed on the current segment. The database movement commands (CHILD, KEY, NEXT, PARENT, ROOT, and TWIN) enable you to change your current segment position to another segment occurrence in the database.
PAR and RCD TYP1
Displays the segment name of the immediate parent of the current segment type and its description from the segment/layout cross reference dataset. If the current segment type is defined by multiple segment layouts, the current segment’s record type values are also shown.
SEG and CONCAT Key
Displays the segment name of the current segment type and its description from the segment/layout cross reference dataset. The first 37 characters of the fully concatenated key of the current segment are also displayed. The key values for each segment type represented in the fully concatenated key are separated by commas.
Level Number/Data-Name
Displays the level number and data-name of each item in the segment layout.
Format
Displays the format of each item (for COBOL, its USAGE and PICTURE information; for PL/I, its attribute information). The Format column is blank for group items. For elementary items, it has the following meaning:
COBOL | The first position indicates the field’s data type. |
C | alphanumeric (PIC X) |
P | packed decimal (PIC 9 COMP-3) |
B | binary (PIC 9 COMP) |
Z | zoned decimal (PIC 9, USAGE DISPLAY) |
COMP-1 | COMPUTATIONAL-1 (internal floating point, fullword) |
COMP-2 | COMPUTATIONAL-2 (internal floating point, doubleword) |
INDEX | INDEX data item |
The second position contains an S for signed numeric fields (P, B, and Z items).
The third portion indicates one of the following:
- The number of characters in an alphanumeric field (C item); or
- The number of integer digits in the PICTURE of a numeric field (P, B, and Z items).
The fourth portion indicates the number of decimal digits in the PICTURE of a numeric field (P, B, and Z items). If there are no decimal digits, the fourth portion is blank.
The fifth portion contains a K for fields that define the key of the current segment.
PL/I | The first position indicates the field’s data type. |
C | alphanumeric (CHAR or PIC X) |
P | packed decimal (FIXED DECIMAL) |
B | binary (FIXED BINARY) |
Z | zoned decimal (PIC 9) |
FD | decimal floating point (FLOAT DECIMAL) |
FB | binary floating point (FLOATING BINARY) |
BT | BIT data item |
PTR | POINTER data item |
The second position contains an S for signed numeric fields (P, B, and Z items).
The third portion indicates one of the following:
- The number of characters in an alphanumeric field (C item).
- The number of integer digits in a packed or zoned numeric field (P and Z items).
- The number of integer digits in the maximum value a binary field (B item) can hold (5 for FIXED BIN (1) through FIXED BIN (15); 10 for FIXED BIN (16) through FIXED BIN (31)).
- The number of decimal digits in a decimal floating point field (FD item).
- The number of binary digits in a binary floating point field (FB item).
- The number of bits in a bit field (BT item).
The fourth portion indicates the number of decimal digits in a packed or zoned numeric field (P and Z items). If there are no decimal digits, the last portion is blank.
The fifth portion contains a K for fields that define the key of the current segment.
Field Value
Displays the contents of each elementary item in the current segment. Field Value is blank and protected for lines with non-elementary items. It is also protected for key fields. Simply type over the Field Value column to change the field value.
For alphanumeric fields, this column shows the character representation of the field with the following exceptions:
- If the field contains all hexadecimal zeros (X’0000...’), the word LOW-VALUES is displayed. Conversely, to enter HEX zeros in an alphanumeric field, enter the word LOW-VALUES.
- If the field contains all hexadecimal Fs (X’FFFF...’), the word HIGH-VALUES is displayed. Conversely, to enter HEX Fs in an alphanumeric field, enter the word HIGH-VALUES.
- If the field contains non-displayable characters and is not all HEX zeros or Fs, the word INVALD is displayed, followed by one of the following:
- The hexadecimal representation of the field for fields 10 characters or less in length in the format - X’nnnn...’. This HEX string can be changed by either typing over it or by erasing the entire field and entering a new HEX string, left justified in the field.
- The literal "-SEG POSITION nnnnn" for fields greater than 10 characters in length, where nnnnn represents the starting position of the field in the segment. In this case you must use the Unformatted mode to view the contents of the field or to enter a HEX string in the field.
Alphanumeric fields longer than 30 positions are split across as many consecutive lines as necessary. If a field longer than 30 bytes contains an invalid character, the "INVALD" message is displayed on the line that contains that character.
For example, a data element occupies 40 bytes, which are split across 2 lines in the Field Value column (30 bytes on the first line and 10 on the second line). If an invalid character exists in this 40-byte field, the "INVALD" message is displayed according to the position of the invalid character as outlined below:
- If the invalid character occurs in positions 1 through 30, the "INVALD" message is displayed on the first line.
- If the invalid character occur in positions 31 through 40, the "INVALD" message is displayed on the second line.
In the following figure, the data element ORDER-DESCRIPTION contains an invalid character between positions 31 and 40. This condition caused the "INVALD" message to be displayed on the second line occupied by ORDER-DESCRIPTION in the Field Value column.
Formatted Screen - Invalid Character Beyond Position 30

Zoned decimal, packed decimal, and binary fields are converted to external decimal for display and type over purposes. An external decimal consists of a negative sign (for signed fields that contains a negative value), the integer portion of the number, and, for fields with decimal positions, a decimal point followed by the decimal portion of the number. The following rules apply when numeric fields are typed over:
- The value can start anywhere in the Field Value column.
- There can be one or more blanks between the negative sign, if any, and the value.
- No spaces can be embedded in the integer and decimal portions of the value.
- The sign and integer and decimal precision of the value entered are fully validated against the field format.
- Scale positions must be zero in the value entered.
- A HEX string (for example, X’4141...’) can be entered in fields that are 10 characters or less in length.
If a numeric field initially contains an invalid value given its field format, the word "INVALD" is displayed followed by one of the following:
- The hexadecimal representation of the field for all binary and packed fields and for all zoned decimal fields 10 characters or less in length in the format - X’nnnn...’. This HEX string can be changed by either typing over it or by erasing the entire field and entering a new value, left justified in the field.
- The literal "- SEG POSITION nnnnn" for zoned decimal fields greater than 10 characters in length, where nnnnn represents the starting position of the field in the segment. In this case, you must use the Unformatted mode to view the contents of the field or to enter a HEX string in the field.
File-AID for IMS considers numeric fields to be invalid in the following situations:
- A zoned or packed field is not in the zoned or packed format.
- An unsigned field contains a negative value.
- A packed or binary field contains a value too large for the number of digits in its field format.
COBOL
File-AID for IMS does not format POINTER and INDEX data items. The Field Value column always shows the hexadecimal representation of these fields in the format X’nnnn...’. This HEX string can be changed by either typing over it or by erasing the entire field and entering a new HEX string. The field value must be entered as a four byte HEX string (for example, X’41414141’). The HEX string can start anywhere in the Field Value column but cannot contain embedded spaces.
PL/I
File-AID for IMS does not format FLOAT BINARY and POINTER data items. The Field Value column always shows the hexadecimal representation of these fields in the format X’nnnn...’. This HEX string can be changed by either typing over it or by erasing the entire field and entering a new HEX string. For FLOAT BINARY data items that are stored in fullwords of storage and POINTER data items, the field value must be entered as a four byte hexadecimal string (for example, X’41414141’). For FLOAT BINARY data items that are stored in doublewords of storage, an eight byte hexadecimal string must be entered (for example, X’4141414141414141’). The HEX string can start anywhere in the Field Value column but cannot contain embedded spaces.
For BIT data items, the Field Value column displays the actual bit representation of the field. This bit string can be changed by either typing over it or by erasing the entire field and entering a new bit string, left justified in the field. The bit string must contain only zeros and/or ones and cannot contain embedded spaces.
COBOL
File-AID for IMS displays items that contain REDEFINES and/or OCCURS clauses in a special way. For items that contain the REDEFINES clause, the level number and data-name are shown the normal way, the word REDEFINES is shown in the Format column, and the data-name of the redefined item is shown in the Field Value column. For elementary items, the field format and value are shown on the next line. Type overs are processed from top to bottom. If both the redefined and redefining items are typed over, the redefining item is processed last and overlays the value in the redefined item.
Items that contain an OCCURS clause are displayed with two heading lines followed by each occurrence of the field with the occurrence number in parentheses. The first heading line shows the level number and data-name in the normal way. The Format and Field Value columns are blank unless the DEPENDING ON option is present and the object of the DEPENDING ON is invalid. In this case, a message is displayed, to indicate the problem with the object of the DEPENDING ON. The second heading line shows the number of occurrences in the Level Number/Data-Name column and the data-name of the object of the DEPENDING ON, if any, in the Field Value column.
When an OCCURS clause has the DEPENDING ON option specified, you can dynamically control the number of times the item occurs by typing over the value of the object of the DEPENDING ON. The value of the object of the DEPENDING ON can range from the minimum to the maximum number of occurrences specified in the OCCURS clause. This process enables you to easily expand and contract a variable length segment. When you increase the value of the DEPENDING ON object, the new occurrences are initialized to blanks and zeros based on the record layout.
PL/I
File-AID for IMS displays array items in a special way. For each array, two heading lines are displayed followed by each occurrence of the field with the occurrence number in parentheses. The first heading line shows the level number and data-name in the normal way. The Format and Field Value columns are blank. The second heading line shows the number of occurrences as specified by the array’s dimension attribute in the Level Number/Data-Name column.
Following the last line of the segment layout, an end of layout message that indicates the length in characters of the segment layout is displayed in the Level Number/Data-Name column. If the segment layout length and current segment length are unequal, a message that indicates the difference is displayed in the Field Value column. If the segment layout is shorter than the segment, the portion of the segment beyond the segment layout is not displayed nor can it be modified in Formatted mode. If the segment layout is longer than the segment, the fields extending beyond the segment have the message "FIELD EXTENDS BEYOND CURR SEG" displayed in the Field Value column, and the fields cannot be typed over.
This section provides more information about the following topics: