Record Selection Criteria panel

The Record Selection Criteria panel is used to set record selection criteria in copybook templates, using the "by field" method (see Selecting records with templates).

Panel and field definitions

Figure 1. Record Selection Criteria panel
  Process   Options   Help
 ───────────────────────────────────────────────────────────────────────────────
 Z Data Tools      Record Selection Criteria                        Line 1 of 6

 Cmd Con ( Field Name                          Op  Value                       )
     <-> - <---+----1----+----2----+----3----> <-> <---+----1----+----2----+-- -
 *** ****  Top of data  ****
           REC-TYPE01
     AND   REC-TYPE                                                             
     AND   NAME                                                                 
     AND   EMPLOYEE-NO                                                          
     AND   AGE                                                                  
     AND   SALARY                                                               
     AND   FILLER                                                               
 *** ****  End of data  ****

 Command ===>                                                       Scroll PAGE
  F1=Help      F2=Split     F3=Exit      F4=CRetriev  F5=RFind     F6=RunTemp
  F7=Up        F8=Down      F9=Swap     F10=Left     F11=Right    F12=Cancel    
Cmd
Prefix command area - used to enter a template editor prefix command.
Con
Connectors - used to specify the AND/OR connectors. These are only relevant to lines containing record selection expressions. The default value is AND. You can overtype the connectors with any of the following values:
Value entered
Resultant value
AND
AND
&
AND
OR
OR
|
OR
Note: Abbreviations are accepted. For example, if you overtype AND with O, it is changed to OR.
(
Left Parenthesis - Parentheses must only be used on lines containing expressions. They are used to group record selection criteria. The number of left parentheses must match the number of right parentheses.
Field Name
A non-editable field that displays the field names defined in the original copybook.

Use the STR primary command to toggle the displaying of the structure (level information) in the Field Name area of the display. The current setting is remembered for future sessions.

Note: If you are running a screen width of 115 or greater, the Field Name field can be displayed at the same time as the Start, Length and Type fields. However, at any width less than this, you need to toggle the display between Field Name and Start, Length and Type. The default display is Field Name. To toggle the display, ensure that your cursor is not in a Value field and press the Right function key (F10) or Left function key (F11).
Op
Operator - used to create record selection expressions. Valid operators are:
=, EQ
True if the terms are equal (numerically or when padded)
\=, ¬=, /=, NE
True if the terms are not equal (inverse of =)
>, GT
Greater than
<, LT
Less than
><, <>
Greater than or less than (same as not equal)
>=, GE
Greater than or equal to
\<, ¬<
Not less than
<=, LE
Less than or equal to
\>, ¬>
Not greater than
==
True if terms are strictly equal (identical)
\==, ¬==, /==
True if the terms are NOT strictly equal (inverse of ==)
>>
Strictly greater than
<<
Strictly less than
>>=
Strictly greater than or equal to
\<<, ¬<<
Strictly NOT less than
<<=
Strictly less than or equal to
ACO
Contains all of the values specified. Matching case sensitive. The negative form is XCO.
ACU
Contains all of the values specified. Matching not case sensitive. The negative form is XCU.
CO
Contains one of the values specified. The negative form is ¬CO.
CU
Contains one of the values specified. Matching not case sensitive. The negative form is ¬NC.
NC
Numeric contains - a number is one of the values. The negative form is ¬NC.
NN
(Same as ¬NU.) Field does not contain a valid numeric for the field type. The positive form is NU.
NR
Not in range - field < value1 or field > value2. The positive form is RG.
NU
Field contains a valid numeric for the field type:
Field type
Test for being valid numeric
BI, FE, FP, PD, and ZD
Checked against the field definition
Other
Recognized as numeric if the display value or character value the field contains is a valid number. The valid number can contain anything that is valid for a floating-point external or decimal number. For example:
-1234.55
+3.4621E+10
The negative form is ¬NU.
RG
Range - value1 >= field <= value2. The negative form is NR.
XCO
Does not contain all of the values. Matching case sensitive. The positive form is ACO.
XCU
Does not contain all of the values specified. Matching case sensitive. The positive form is ACU.
¬CO
Does not contain one of the values specified. The positive form is CO.
¬CU
Does not contain any of the values specified. Matching not case sensitive. The positive form is CU.
¬NC
Does not contain the specified number(s). The positive form is NC.
¬NU
(Same as NN.) Field does not contain a valid numeric for the field type. The positive form is NU.
VER
Verify this field is composed only of characters specified in the Value column.
Value
Use this field to provide a character or numeric constant to be used for comparison in the expression. If the operator supports more than one value (for example, RG, CO) then use comma delimiters to provide separate values. When specifying values, the following rules apply:
Hexadecimal strings
A hexadecimal string must be in the form 'hhhhhh'x. The value enclosed in quotation marks must be an even number of characters and contain valid hexadecimal characters. (0123456789ABCDEF).
Binary strings
A binary string must be in the form 'nnnnnn'b. The value enclosed in quotation marks must be a combination of 0 and 1s.
Numeric Operands
The value(s) specified for a numeric field type must be a valid number. Quoted values are not accepted.
Character strings
For non-numeric types the value is automatically enclosed in quotation marks if you do not specify them. When specifying more than one value for operations other than RG and NR you must provide quotation marks for all the comma delimited values.
Date strings
A date string must be in the form d’xxxxxxxx’. The string must be specified in the output format defined for the field.
The following is an example of a date value:
      d'Jan 01, 2014'
where the output format is:
      Mmm DD, YYYY
Time strings
A time string must be in the form t’xxxxxxxx’. The string must be specified in the output format defined for the field.
The following is an example of a time value:
      t'15:30:00.000'
where the output format is:
      HH:MI:SS.999
Note:
  1. Date and time strings cannot be used with contains operators.
  2. When used with range operators requiring two values the second value should be quoted, for example, d'Jan 01, 2014','Dec 01, 2014'
  3. Use d'=' or t'=' to retrieve the current date or time value in the output format.
)
Right Parenthesis - Parentheses must only be used on lines containing expressions. They are used to group record selection criteria. The number of left parentheses must match the number of right parentheses.
Subscripts for dimensioned fields
For dimensioned fields you can optionally enter a subscript in the value area. The subscript must precede the actual value and must be enclosed in parentheses. You can enter one of the following:
(ANY)
This is the default if you do not enter a subscript and it indicates that at least one of the dimensioned fields must satisfy the criteria for the associated condition to be true.
(ALL)
This indicates that all of the dimensioned fields must satisfy the criteria for the associated condition to be true.
(nn)
Use this form to refer to a single element of the array that must satisfy the associated condition. You must enter a valid subscript for the field referenced.

Related tasks and examples