Field Selection/Edit panel

The Field Selection/Edit panel is primarily used to edit copybook templates. You can also edit some properties of dynamic templates within this panel, such as the record selection criteria, field sequencing and field selection. (You cannot modify the Field Name, Start, Length or Type fields; those fields can only be modified in the Dynamic Template panel.)

When you edit a template for segmented data, File Manager displays the Field Selection/Edit panel with an additional line identified by "0 Rid" showing the related ID expression (if any).

You can use the Field Selection/Edit panel (Figure 1) to:
  • Select which fields are displayed (when viewing or editing) or printed.
  • Change the sequence in which fields are displayed or printed.
  • Provide field headings that File Manager uses in place of the copybook or dynamic template field names, when displaying or printing.
  • Begin editing field attributes
  • Specify record identification criteria for the record type
  • Specify record selection criteria for the record type
  • Select fields to be included in a multi-segment key, and specify the order in which they are to be used in a keyed synchronization comparison.
  • Display a subsequent panel from which you can choose which level-01 items to edit related ID criteria for an owning level-01.

Panel and field definitions

Figure 1. Field Selection/Edit panel
  Process   Options   Help
 ──────────────────────────────────────────────────────────────────────────────
File Manager                 Field Selection/Edit                 Line 1 of 10

----------- Criteria - Enter 1 or 2 to specify expression by field -----------
1 Id : #2='02'                                                               +
2 Sel:                                                                       +
Offset      0                                                      CCSID      
Cmd Seq SHE Key Ref Field Name                       Picture  Type Start Length
                    ****  Top of data  ****
                  1 1 REC-TYPE01                               AN      1     80
              1   2  2 REC-TYPE                      XX        AN      1      2
                  3  2 NAME                          X(20)     AN      3     20
                  4  2 EMPLOYEE-NO                   9(4)      BI     23      2
                  5  2 AGE                           9(4)      BI     25      2
                  6  2 SALARY                        9(7)      PD     27      4
                  7  2 MONTH OCCURS 12 TIMES         9(8)      BI     31      4
                  8  2 FILLER                        XX        AN     79      2
                    ****  End of data  ****


 Command ===>                                                       Scroll PAGE
  F1=Help      F2=Split     F3=Exit      F4=Expand    F5=RFind     F6=RunTemp
  F7=Up        F8=Down      F9=Swap     F10=Left     F11=Right    F12=Cancel 
Figure 2. Field Selection/Edit panel - alternative format for a template for segmented data
  Process   Options   Help
 ──────────────────────────────────────────────────────────────────────────────
 File Manager                 Field Selection/Edit                  Line 1 of 6

 ---Criteria - Enter 0 - Related ID expression, 1 or 2 - expression by field---
 0 Rid: SEG(HEADER-01):#5: TYPEREC    ='01'                                   +
 1 Id :                                                                       +
 2 Sel:                                                                       +
 Offset      0           Enter "/" to OR with related ID            CCSID      
 Cmd Seq SHE Ref  Field Name                          Picture  Type Start Length
                  ****  Top of data  ****
               1  1 DETAIL-0101                                 AN      1     30
               2   2 SUBTYPE-FIELD                              AN      1      9
               3    3 SUBTYPECONST                    X(7)      AN      1      7
               4    3 TYPEREC                         X(2)      AN      8      2
               5   2 DETAILTEXT01                               AN     10     21
               6    3 DETAIL01-01                     X(21)     AN     10     21
                  ****  End of data  ****



 Command ===>                                                       Scroll PAGE
  F1=Help      F2=Split     F3=Exit      F4=Expand    F5=RFind     F6=RunTemp
  F7=Up        F8=Down      F9=Swap     F10=Left     F11=Right    F12=Cancel
0 Rid
Used to specify the related ID expression. This line only appears on the Field Selection/Edit panel when you are editing a template for segmented data (which you indicate by selecting the Template for segmented data processing option on the previous panel (Record Type Selection).
1 Id
Used to specify the Record identification criteria that File Manager should use to identify this record type. In the absence of record identification criteria, File Manager uses the record length to identify record type.

For fixed-length records (as defined by the record definition in the template, not the data set attributes), the length of the record read must exactly match the length of the corresponding record definition in the template. For variable-length records, the length of the record read must be equal to or greater than the minimum length and equal to or less than maximum length of the corresponding record definition in the template.

If File Manager cannot match the length of a record to one of the record definitions in the template, the record is not selected for processing. If the length of a record matches more than one record definition in the template, and no explicit record identification criteria is specified, File Manager uses the first matching record type in the template. Therefore, if the record length of each different record type in the file is not unique, you should use this field to specify some unique identification criteria.

Enter 1 to display the Record 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 select option 1 and enter criteria by field, any free form REXX expression entered in the adjacent field is replaced by the new criteria. You cannot manually edit this expression. To restore the ability to create a freeform REXX expression for record identification, you would need to clear any criteria entered in the Record Identification Criteria panel.

2 Sel
Used to specify the Record selection criteria that File Manager should use to select records for processing. You can use this field to limit the records of a given record type that you want to process. If you do not provide any record selection criteria, all records of this record type are selected for processing (if the record type itself has been selected for processing).

Enter 2 to display the Record 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 select option 2 and enter criteria by field, any free form REXX expression entered in the adjacent field is replaced by the new criteria. You cannot manually edit this expression. To restore the ability to create a freeform REXX expression for record selection, you would need to clear any criteria entered in the Record Selection Criteria panel.

Offset
Offset field - used to enter an offset value. An offset value is a negative or positive integer, between -32760 and +32760, that is added to the record length of the Level 01 field and to the starting position of all fields within the record type, shifting the layout left or right in relation to the records being processed. An offset value of 0 removes a previously supplied offset.
Enter "/" to OR with related ID
By default, identification criteria are ANDed with related ID criteria if both are specified. Select this option to OR the identification criteria with any specified related ID criteria.
CCSID
The CCSID to be associated with all alphanumeric fields in the record unless the field has a CCSID associated with it. If this field is changed those alphanumeric fields in the record which have the same CCSID will have the CCSID associated with it changed.
Cmd
Prefix command area - used to enter a template editor prefix command.
Seq
Sequence field - used to order fields for display in File Manager editor sessions and printing data via the File Manager Print utility. The default display/print order is "selected fields in field reference order".
SHE
Select/Hold/Edit field - shows the field status:
S
The field has been selected for processing.
H
The field has been selected to be held on the edit display.
E
The field has been previously edited to add information such as data create, field headings, and scrambling options.
Ref
Field reference - shows the field reference number assigned by File Manager to the field name. Field reference numbers are assigned to all fields in a record, and are used to identify fields in identification or selection criteria expressions.
Key
Key segment sequence. Shows the key segment sequence numbers used to define a multi-segment key field for data set comparison. The display of the Key column can be toggled on or off using the KEYFLDS command.
Field Name
Shows the level number and field name of the field, together with other attributes such as redefines, array sizes and depending on references. If the field is an array, the dimensions are shown in brackets after the field name. If the field has been selected for processing, the field name is highlighted.
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
An editable field in which you can enter or edit the data type of a field. This must be one of:
AN
Alphanumeric
AX
Alphanumeric displayed in long hexadecimal.
BI
Binary
BT
Bit string
DB
DBCS string
DT
Data/Type
FE
Floating point (external)
FP
Floating point (internal)
G
Graphic string
PD
Packed decimal
VB
Varying bit
VC
Varying character
VD
Varying DBCS
VG
Varying graphic
Z2
Null-terminated varying-length(VARYINGZ) DBCS string
ZA
Unsupported zoned decimal edited
ZC
Varying character null terminated
ZD
Zoned decimal
ZE
Zoned decimal edited
ZG
Varying graphic null terminated
Start
Shows the start column of the field. For variable located fields the start location is based on the maximum length of the record.
Length
Shows the length of the field. For a level-01 field, if the record is variable length, the length shown is the maximum record length.

Available commands

The prefix commands that can be entered in the Cmd field are:

E
Displays the Field Attributes panel for this field. You can use the Field Attributes panel to specify the following:
  • 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.
  • When you use the template to help generate test data, what data pattern File Manager should use for the field.
H
Set Hold status for a single field, if the field is already in Hold status the Hold status is removed.

In TABL display format, held fields always appear as the leftmost fields on the screen (in the order that you held them when editing the template). Held fields take priority, as far as the left-to-right display is concerned, over other fields.

In SNGL display format, held fields always appear as the topmost fields on the screen (in the order that you held them when editing the template). Held fields take priority, as far as the top-to-bottom display is concerned, over other fields.

Hn
Set Hold status for n fields, if any of the fields are already in Hold status, the Hold status is removed.
HH
Select 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 a single field for processing or, if the field is already selected for processing, deselect it. If you select multiple fields for processing using the S prefix command, the fields are displayed in the order they appear in the template.
Sn
Select n fields for processing or, if any of the fields are already selected for processing, deselect them.
S*
Select 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, deselect them. If you want to exclude just a few fields, you can use S* to explicitly select all the fields in a fresh template, then use S to deselect the fields you want to exclude.
SS
Select a block of fields for processing or, if any of the fields are already selected for processing, deselect 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.

The primary commands that are available on this panel are:

Parent panels

Child panels

Related tasks and examples