Segment Layout panel

The Segment Layout panel is used to edit the details of a selected segment layout in a Template, View or Criteria.

The panel is displayed when:
  • You select a segment type for edit on the Database Positioning panel, Segment Selection panel, or Template Specification panel and the segment type has only one layout.
  • You select a segment layout for edit on the Segment Layout Selection panel.

You can use the Template : Segment Layout panel to:

  • Set the order of fields using a sequence number
  • Specify expressions for layout identification
  • Modify the offset value for a layout
  • View and print the 01 layout

You can use the View : Segment Layout panel or Criteria : Segment Layout panel to:

  • Select fields for display
  • Edit field formatting and create attributes
  • Specify expressions for layout identification
  • Modify the offset value for a layout
  • View and print the 01 layout

Panel and field definitions

Figure 1. Segment Layout panel
 Process   Options   Help
──────────────────────────────────────────────────────────────────────────────
 FM/IMS                   Criteria : Segment Layout                 Line 1 of 9

 Criteria New                                                   Subset
 Template FMN.IMS.IVP.TEMPLATE(DJ1E)                           Segment SHIRE
 --------- Criteria - Enter 1 or 2 to view/specify expression by field --------
 1 Id : #4='0'                                                                +
 2 Sel:                                                                       +
 Offset 0
 Cmd Seq SHC Ref  Field Name                          Picture  Type Start Length
                  ****  Top of data  ****
               1  1 SHIRE                                       AN      1     53
               2K  2 SHIRE-KEY                                  AN      1     20
               3K   3 SHIRE-NAME                      X(20)     AN      1     20
               4   2 SHIRE-TYPE                       X(1)      AN     21      1
               5   2 SHIRE-CODE1                      9(3)      ZD     22      3
               6   2 SHIRE-CODE2                      9(5)      ZD     25      5
               7   2 SHIRE-ROAD                       S9(15)    PD     30      8
               8   2 SHIRE-RIVER                      S9(15)    PD     38      8
               9   2 SHIRE-BRIDGE                     S9(15)    PD     46      8
 Command ===>                                                       Scroll CSR 
  F1=Help    F2=Split   F3=Exit    F4=Expand  F5=RFind   F7=Up      F8=Down
  F9=Swap   F10=Left   F11=Right  F12=Cancel
Criteria/View
The name of the data set containing the criteria set or view being edited. (Not displayed on the Template : Segment Layout panel.)
Subset
A number or letter assigned by FM/IMS to identify the criteria subset (Criteria : Segment Layout panel only).

It has one of the following values:

R
The relational criteria subset
1 to 255
The field criteria subsets.
Template
The name of the partitioned data set that holds the underlying template.
Segment
The name of the segment displayed.
Offset
The current offset value for all fields in the layout.
1 Id
Used to specify the identification criteria that File Manager should use to identify this layout. (Editable on the Template : Segment Layout panel. Displayed as read-only on the View or Criteria : Segment Layout panels, when the segment has multiple layouts; not displayed on these panels when there is only one layout for the segment).

On the Template : Segment Layout panel, enter 1 to display the Layout Identification Criteria panel and specify the criteria by field, or type a free form REXX expression in the adjacent field. You can scroll to the right or left within the field, using the Right (F11) or Left (F10) function keys, or you can expand the field, using the Expand function key (F4).

Specifying criteria by field or by free form REXX expression is mutually exclusive. If you enter criteria by field, any free form REXX expression entered in the adjacent field is replaced by the new criteria and the field becomes protected. You cannot manually edit this expression. To restore the ability to create a freeform REXX expression for layout identification, you need to clear any criteria entered in the Layout Identification Criteria panel.

2 Sel (or 1 Sel if 1 Id is not displayed)
Used to specify the segment selection criteria that File Manager should use to select segments for processing (not available on the Template : Segment Layout panel, editable on the View or Criteria : Segment Layout panels).

You can use this field to limit the segments of a selected layout that you want to process. When a segment type has multiple layouts, the field selection criteria for the layouts are ORed to give the field selection criteria for the segment type. The field selection criteria for the segment types of the database are ANDed to give the field selection criteria for the view. The field selection criteria for the view are then used in conjunction with the settings of the Sel field on the following panels to select segment occurrences and fields for processing. If you do not provide any segment selection criteria, all segments with this layout are selected for processing when the layout itself has been selected for processing.

Enter 2 (or 1 if 1 Id is not displayed) to display the Field Selection Criteria panel and specify the criteria by field, or type a free form REXX expression in the adjacent field. You can scroll to the right or left within the field, using the Right (F11) or Left (F10) function keys, or you can expand the field, using the Expand function key (F4).

Specifying criteria by field or by free form expression is mutually exclusive. If you enter criteria by field, any free form REXX expression entered in the adjacent field is replaced by the new criteria and the field becomes protected. You cannot manually edit this expression. To restore the ability to create a freeform REXX expression, you need to clear any criteria entered in the Field Selection Criteria panel.

Cmd
Prefix command area - used to enter a template editor prefix command. (Not displayed on the Template : Segment Layout panel.)

You can type prefix commands in multiple Cmd fields and then execute all the commands in one action, by pressing Enter. Line commands available on this panel are:

DT (date/time)
Displays the Date/Time Attributes panel. You can use the Date/Time Attributes panel to define or change:
  • The internal format used to store the date and time value.
  • An alternate data type used for date and time processing.
  • The output format used to display the date and time value.
  • Values used when creating new records and modifying copied records.
  • Options for scrambling the date and time values from copied records.
E (edit)
Displays the Field Attributes panel for this field. You can use the Field Attributes panel to specify:
  • For a numeric field, whether you want leading zero suppression when the field is displayed on the screen or printed using the SNGL or TABL display or print formats.
  • Alternative headings.
  • Width of columns on TABL format displays.
  • Create data attributes.
H (hold)
Sets Hold status for a single field or, if the field is already in Hold status, removes the Hold.

In TABL display format, as you scroll left or right those fields are always displayed on the left of the panel. In SNGL display format, as you scroll up or down those fields are always displayed at the top of the panel.

Hn
Sets Hold status for n fields. If any of the fields are already in Hold status, the Hold status is removed.
HH
Selects a block of fields to have the Hold status set. If any of the fields are already in Hold status, the Hold status is removed. Use the HH prefix command to mark the start and end of the block of fields.
S (select)
Selects a single field for processing or, if the field is already selected for processing, deselects it. If you select multiple fields for processing using the S prefix command, the fields are displayed in the order they appear in the panel.
Sn
Selects n fields for processing or, if any of the fields are already selected for processing, deselects them.
S*
Selects all fields from the current field to the end of the list for processing or, if any of the fields are already selected for processing, deselects them. If you want to exclude just a few fields, you can use S* to explicitly select all the fields, then use S to deselect the fields you want to exclude.
SS
Selects a block of fields for processing or, if any of the fields are already selected for processing, deselects them. Use the SS prefix command to mark the start and end of the block of fields.
X
Toggle between a display type of AN (character) and AX (long hexadecimal). This command has no effect on non-alphanumeric fields.
Xn
Perform the X command against all fields from the current field for n fields.
X*
Perform the X command against all fields from the current field to the end of the list.
XX
Perform the X command against a block of fields. Use the XX prefix command to mark the start and end of the block of fields.
Seq
Sets the order of the fields to appear in the template.
SHC
Shows the field status:
S
The field has been selected for processing. The field is selected for processing if the segment occurrence is selected for processing.
H
The field has been selected to be held on the Edit or Browse display. Held fields appear, in sequence number order, on the extreme left of the display in table mode. Scrolling left or right has no effect on the position of these fields (they remain in place, while other, non-held fields change position).
C
Create data attributes have been defined for the field. (Note that data create patterns are not currently used by any FM/IMS functions.)
Ref
The field reference number assigned by FM/IMS to the field name. All fields in a segment layout have a number. Use the number to reference a field in layout identification criteria and field selection criteria. The reference number may be suffixed with a key indicator:
K
The field is a key (or part of a key).
S (Uppercase S)
The field is a secondary index search field.
s (lowercase s)
The field is a secondary index subsequence field.
Field name
The level-number and the name of the field as given in the COBOL or PL/I segment layout. Various other attributes such as redefines, array sizes, depending on references are also be displayed as part of the name.
Picture
Shows the picture clause for COBOL and for PL/I. Shows the length and scale (if non zero) for binary and packed fields. Also shows the bit length for bit fields.
Type
The data type of the field:
AN
Alphanumeric
AX
Alphanumeric displayed in long hexadecimal.
BI
Binary
BT
Bit string decimal (external decimal)
DT
Date/Time
FP
Floating point (internal or external)
PD
Packed decimal (internal decimal)
VB
Varying-length (VARYING) bit string
VC
Varying-length (VARYING) character string
VG
Varying-length (VARYING) graphic string
ZC
Null-terminated varying-length (VARYINGZ) character string
ZD
Zoned decimal (external decimal)
ZE
Zoned decimal edited
ZG
Null-terminated varying-length (VARYINGZ) graphic string
Start
The column at which the field starts. For variable located fields, the start column is calculated using the maximum length of the field.
Length
The length of the field. For a level-01 field with a layout of variable-length, the length shown is the maximum length of the layout.

For a criteria set, the only relevant area on this panel is the Field Selection Criteria, which you use to specify which segments of this type and layout are extracted. (The Cmd and Seq fields have no effect on the criteria set.)

Parent panels

Child panels