Unformatted Selection Criteria
The following figure allows you to enter freeform data specification criteria to select records without the use of record layouts. You can scroll the screen down to enter additional criteria. Scrolling up displays previously entered criteria. File-AID displays the Unformatted Selection Criteria screen when you enter option 3 on the Selection Criteria Menu.
Unformatted Selection Criteria screen
Field Descriptions
Cmd
Specify one of the following valid line commands to edit your selections:
A - Marks the destination after which a line is placed.
B - Marks the destination before which a line is placed.
C - Copy the line to a marked destination.
D - Delete the line. Dnn deletes the specified number of lines.
I - Insert a line. Inn inserts the specified number of lines.
M - Move the line to a marked destination.
R - Repeat the line. Rnn repeats the line the specified number of times.
AND/OR
Specify the AND/OR parameter to define multiple condition testing. It defines the logic to use to connect multiple conditions.
File-AID considers the OR connector the beginning of a new set of selections. AND continues a logical set of selections.
When evaluating ANDed conditions, all the conditions must be true. When evaluating ORed conditions, only one of the conditions must be true.
For example, if you specify: Selection 1 AND Selection 2 OR Selection 3, File-AID evaluates it as: (Selection 1 AND Selection 2) OR Selection 3.
Use File-AID option 0.2 System Parameters to set the default for the AND/OR field.
Each selection can have multiple OR conditions as described in Multiple Data Entries .
Position
Specify the location within a record where File-AID is to begin the data comparison. The position value can be either actual or relative. An actual position is indicated by an unsigned number. A signed number (+ or -) indicates a relative position.
An actual position can be any number from 1 (one) to the maximum record length of the input file.
A relative position can be specified when scanning a record with the CO (contains) relational operator. It is a signed (+ or -) number that indicates an offset from the beginning of the matched data. Relative position (+0) points to the first byte of data of the matched scan. If no scan is defined, relative position (+0) points to the first byte of data in the record. A relative location cannot point to a position outside the record.
Variable-length records begin with a four-byte Record Descriptor Word (RDW). Position one points to the first byte of the data portion of the record. If you want to reference the RDW, use a relative position of -4.
Length
Specify the field length. Length is an optional field for most relational operators. VA, NV, VU, and NU relational operators are the exception and this field is required unless you specify packed data.
The length value plus the position value cannot exceed the record length. The value you specify in the Length field must be equal or greater than the length of the data value in bytes.
For the CO (contains) and NC (not contains) relational operators, the Length field specifies the number of positions in the record that File-AID scans for the specified data value. The length value can be from 1 to the maximum record length. If the Length field is left blank, each record is searched from the location specified in the Position field to the end of the record.
For the remainder of the relational operators, length defines the number of positions in the record that File-AID compares. The length value can be from 1 to 256.
If the Length field value exceeds the actual length of the data specified in the data value field, File-AID pads the data value with blanks to the right. When the Length field is left blank, File-AID determines the length of the field based on the actual data value length.
RO
Specify a relational operator. File-AID is distributed with a default value of EQ (equal) for relational operator. Valid values are:
Conditional operators: | |
EQ, = | Equal to |
NE, ¬=, != | Not equal to |
GT, > | Greater than |
GE, >= | Greater than or equal to |
LT, < | Less than |
LE, <= | Less than or equal to |
CO | Contains; scans a range of record positions for the presence of the data value. CO works on an equal condition. It reads from the Position value until the data string is matched, the Length value is exceeded, or the end of the record is reached. |
NC | Not contains; scans a range of record positions for the absence of the data value. NC works on a not equal condition. It reads from the Position value until the Length value is exceeded or the end of the record is reached. |
BT | Between; the value is greater than or equal to the first endpoint and less than or equal to the last endpoint. |
NB | Not between; the value is less than the first endpoint or greater than the last endpoint. |
VA | Valid character, text, numeric, or packed data based on the specified data type. VA operator will treat character and text as numeric. For a numeric data type, you must specify a length. |
NV | Not valid numeric or packed data based on the specified data type. NV operator will treat character and text as numeric. For a numeric data type, you must specify a length. |
VU | Valid unsigned display numeric data based on the specified data type where the last digit must not contain a sign. VU operator will treat character and text as numeric. For a numeric data type, you must specify a length. VU cannot be used on packed data. |
NU | Not valid unsigned display numeric data based on the specified data type where the last digit must not contain a sign. NU operator will treat character and text as numeric. For a numeric data type, you must specify a length. NU cannot be used on packed data. |
Bit relational operators used with the M (mask) data type: | |
EQ | Bits are all ones |
MX | Bits are mixed, ones and zeros |
NE | Bits are all zeros |
NO | Bits are not all ones. |
Data Value
Specify the data string, up to 52 bytes, for which File-AID is to search. If a data type is specified, the data string must be enclosed in single (’ ’) or double (" ") quotes. When a data type is not specified, alphanumeric text (T) is assumed.
The following table describes valid data types for this field:
Data Types
Data Type | Type Description | Example | Description of Data |
---|---|---|---|
B | Binary | B’+147,-25,+1117’ | Binary equivalent of decimal number specified in quotes. In this example using the default of fullword, File-AID searches for 00000093, FFFFFFE7, or 0000045D. File-AID assumes the length of 4 or you can specify 1, 2, 4, or 8. Note: If the binary data in the record contains a sign, all data values must also contain a sign (+/-). |
C | Character | C’Smith’ | Case-sensitive character value of uppercase S and lowercase mith. |
X | Hexadecimal | X’0001FF’ | Hexadecimal value 0001FF. |
M | Mask (Use with bit relational operators) | M’11000000’ or M’C0’ | The mask can be specified in binary or hexadecimal to indicate which bits File-AID should examine. This example tests the first two bits of the specified byte. |
N | Numeric | N’25’ | Positive or unsigned numeric value +25 or 25. |
P | Packed | P’12345’ | Positive or unsigned packed value. |
T | Text | T’smith’ | Alphanumeric text, not case-sensitive. Value smith, SMITH, or any combination of upper and lowercase characters. T (text) is the default data type. |
Guidelines
The T data type specifies a non-case-sensitive search. Since T is the default, File-AID does a non-case-sensitive search if the data type is not specified. Use a data type of C to search for case-sensitive character data (search for upper and lowercase data exactly as specified).
For packed data, you need to specify only the significant digits. When a length is not specified, File-AID scans the data for the sign to determine the length of the packed field. Records that do not contain valid packed data at the specified position are skipped.
Hexadecimal data must be specified in multiples of two digits or letters.
For the EQ, NE, GT, GE, LT, and LE operators, you can compare a field to blanks (hexadecimal 40s) by leaving the Data Value field blank and entering the number of positions to compare in the Length field. The Data Value field is pre-filled with C" ". All other operators require an entry in the Data Value field.
Multiple Data Entries
When you specify multiple data entries in the Data Value field, separate each entry with a comma. The comma is interpreted as an OR. This gives File-AID the ability to search for multiple data values at a specified Position. For example: smith,jones.
In this case because T is the default data type, File-AID searches for the non-case-sensitive values of smith or jones at the specified location.
Comma Character as Data
Since File-AID interprets a comma as an OR, the syntax of the search data is important. To search for a comma as data, enclose the data in double quotes ( " " ). Using no quotes or single quotes around a comma causes it to be treated as an OR. For example: ",DSN=". In this case, File-AID searches for a comma that is part of the ,DSN= data string.
Duplication Factor
File-AID allows you to specify a duplication factor, which eliminates the need to code repetitive data. The duplication factor is a number from 1 through 255, which specifies the number of contiguous occurrences of the specified data value for which File-AID compares. For example, 10C'ABC'
A duplication factor is allowed with EQ, GE, GT, LE, LT, MX, NO, VA, NV, VU, and NU.
Valid and Invalid Data Checking
For the VA (Valid), NV (Not Valid), VU (Valid Unsigned), and NU (Not Valid Unsigned) relational operators, the Length field determines the portion of each record that is tested for validity.
For VA and NV, only data types C (Character), T (Text), P (Packed), and N (numeric) are valid and one must be specified as the only entry in the Data Value area. Character and Text are treated as Numeric.
For VU and NU, only data types C (Character), T (Text), and N (numeric) are valid and one must be specified as the only entry in the Data Value area. Character and Text are treated as Numeric.
For VA, numeric data is valid if all digits (0-9(x'F0-F9')); the low order digit may contain a C or D zone.
For VU, numeric data is valid if all digits (0-9(x'F0-F9')), including the low order digit. The low order digit must contain an F zone.
Duplication factors are permitted - Ex. VA 5P (five valid packed fields).
For P (Packed) testing, the Length may be left blank for VA, File-AID will automatically determine length.
Japanese Data
DBCS and single byte Katakana data is accepted as selection criteria data values for data types C (Character) and T (Text). With unformatted selection criteria, File-AID removes any leading or trailing shift characters from DBCS data unless the value is enclosed in double quotes.
When KANA is specified for the Character Set option on the System Parameters screen (option 0.1), C (Character) and T (Text) identifiers are both treated as case-sensitive C (Character) data.
Primary Commands
The following primary commands are valid on the Unformatted Selection Criteria screen. Each command is discussed in Primary-commands.
CANCEL (CAN)
Terminates selection criteria editing without saving member.
END
Terminates unformatted selection criteria editing and returns to the selection criteria menu.
FMT (F, 2)
Displays the Formatted Selection Criteria screen.
OPT (O, 1)
Displays the Selection Criteria Options screen.
SAVE
Saves selection criteria member.
VIEW (V)
Displays the View Criteria screen, which displays the current selection criteria settings for options, formatted, and unformatted. See View Criteria Screen.
Related topics