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 File-AID Selection or Data Replace Criteria screens.

The title will indicate Field-to-Field Selection Criteria or Field-to-Field Change Criteria.

Field-to-Field Criteria

image2021-3-19_14-31-56.png

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 Data Replace 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 fields, 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 selection criteria the field is blank and you must fill in a valid Relational Operator.

For change criteria it is prefilled with the "R" Relational Operator and is a protected field for display only.

CAPS

The CAPS field is displayed for char/text data for selection criteria only. You may change to 1 = CAPS ON (default) 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.

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 parameter specifications.

UNDO

This will drop the last or only selection from the current specifications and the associated operator if any.

Related topics

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*