Field-to-field criteria
The following figure is displayed when you enter the Field-to-Field (FF) relational operator in the relational operator (RO) column on any of the Data Solutions Selection or Change Criteria screens.
The title will indicate Field-to-Field Selection Criteria or Field-to-Field Change Criteria.
Field-to-Field Criteria
Command ===> Scroll ===> CSR
Field: EMP-LAST-NAME Position: 6 Format: 15/CHAR
RO ===> R CAPS ===> 1 (1=CAPS ON; 2=ASIS)
Available Selections Format Constant /SUBSTR(pos:len) OP
------------------------------- ------------- ---------------------------- --
_ C O N S T A N T V A L U E N/A
_ &GSSEL GBL 1/CHAR
_ EMP-NUMBER 5/CHAR
_ EMP-LAST-NAME 15/CHAR
_ EMP-FIRST-NAME 10/CHAR
_ EMP-MID-INIT 1/CHAR
_ FILLER 2/CHAR
_ EMP-TITLE 30/CHAR
_ EMP-PERSONAL-INFO --- GROUP ---
_ EMP-NATL-ID-NUMBER 9/FIXPIC
_ FILLER 1/CHAR
_ EMP-DATE-OF-BIRTH 6/CHAR
_ EMP-DOB-REDEF --- GROUP ---
_ EMP-DOB-MM 2/FIXPIC
_ EMP-DOB-DD 2/FIXPIC
_ EMP-DOB-YY 2/FIXPIC
For Selection Criteria this allows you to compare a record or global field to another field or a combination of fields and/or constants.
For Change Criteria this allows you to replace a global field value with the value from another field or a combination of fields and/or constants.
For character fields you may string multiple fields and/or constants together by specifying an RO of ||. For numeric, binary, and/or packed fields you may do a calculation to combine multiple fields and/or constants by specifying an RO of +(add), -(subtract), *(multiply), or /(divide).
The field(s) and/or operators you have already selected will be displayed immediately below the "RO" line. The lines below "Available Selections" will consist of one "CONSTANT" line, followed by global fields, if any, and then record layout fields. Use the UNDO command to undo the last selection entry, one at a time.
Field descriptions
Field
The data name of the target field.
Position
The position of the target field within the record. This will show "GLOBAL" if the target is a global field.
Format
Displays the length of the selected target field, followed by the "/" separator, and then data type.
RO
Identifies the Relational Operator. For change criteria it is prefilled with the "R" Relational Operator and is a protected field for display only.
For selection criteria the field is blank and you must fill in a valid Relational Operator.
CAPS
The CAPS field is displayed for char/text data for selection criteria only. You may change to 1 = CAPS ON or 2 = ASIS. Make sure to set it before you specify any value in the Available Selection area.
Available Selections
The column lists "C O N S T A N T V A L U E", or global field name or record layout field name as the available selection.
Format
Displays the length of the source field, followed by the "/" separator, and then data type.
Constant /SUBSTR
Enter the desired value if selecting the constant line. To process only part of a character field (substring) enter pos:len. where pos = the starting position within the field and len = the number of bytes. 2:3 = field positions 2-4. Substring is allowed on character, display numeric, and graphic fields only.
OP
Operator. To combine multiple fields and/or constants enter an operator. Enter || to string character data together. Enter +(add), -(subtract), *(multiply), or /(divide) to perform a calculation. The operations are performed in the order specified. Field decimal places are ignored and all data is treated as integers except for constants.
Line Command
Select only 1 line at a time by entering an "S" in front of the Available Selection column.
Primary commands
The following primary commands are valid:
CANCEL
Discards the entries.
END
Saves the entered field mask parameters.
UNDO
This will drop the last or only selection from the current specifications and the associated operator if any.