Global criteria


The “Global Criteria” screen, shown in the below figure, is displayed when you enter the GBL primary command in any of the Data Solutions Change or Selection Criteria screens. It lists all global variables defined with option G of the Criteria Menu.

Global Selection Criteria

 File-AID/Data Solutions --- Formatted Selection Criteria ----------------------
 COMMAND ===>                                                    SCROLL ===> CSR

     SET  1 OF  1           GLOBAL-FIELDS                          GBL=N
 ---- FIELD NUMBER/NAME ------ -FORMAT- RO ----+----1----+----2----+----3----+--
 ******************************* TOP OF DATA ***********************************
 1 &GSSEL                        1/AN
 ***************************** BOTTOM OF DATA **********************************


 Valid RO: EQ,NE,GT,GE,LT,LE,CO,NC,BT,NB,VA,NV,VU,NU,MX,NO,FM,FF
 Commands: CHG, RECord, View 

Use this panel to create criteria which will test values of global variables. Enter your selection or change criteria in the same way they would on the record layout. The normal relational operators for the current Data Solutions functions (see Relational Operators for the list of relational operators) are available to operate against the global variables.

Primary Commands

The following primary commands are valid:

CHG

Displays the Data Replace Criteria screen if you are currently in the Selection Criteria screen.

END

Saves all changes and returns to the prior screen.

RECORD (REC)

Returns to the (RECord layout) Formatted Selection or Change Criteria screen.

SELECT (SEL)

Displays the Selection Criteria screen if you are currently in the Change Criteria screen.

VIEW (V)

Displays the View Criteria screen which is a keyword summary of the current settings for options, global variables, formatted, and unformatted selection criteria.

CANCEL

Discards the entries.

Data replace criteria

The following figure is displayed when you enter the CHG primary command in the Global Selection Criteria screen.

Data Replace Criteria

   Action  Sets  Display  Show  Options  Menu  Help                             
 -------------------------------------------------------------------------------
 File-AID/Data Solutions ------- Data Replace Criteria -------------------------
 COMMAND ===>                                                  SCROLL ===> CSR  
                                                                               
 SET  1 OF  1           GLOBAL-FIELDS                            GBL = N SEL = N
 ---- FIELD NUMBER/NAME ------ -FORMAT- RO --------- VALUE/PARAMETERS -------- +
 ******************************* TOP OF DATA ***********************************
 1 &GSSEL                          1/AN R  Y
 ***************************** BOTTOM OF DATA **********************************

Global variables are set on the Data Replace Criteria screen using either the R or FF relational operator.

Relational Operators

The following relational operators are valid:

R

(Replace) Specify a single replacement value in the same way you would enter a value for selection criteria.

A constant value can be assigned to a Global variable with the R (Replace) relational operator of R (replace).

The R relational operator is valid on the Data Replace Criteria screen and will replace the global variable with the value specified in the data area of the panel.

FF

(Field-to-Field) FF displays the Field-to-Field Change Criteria screen which allows you to specify one (1) or more fields and/or constants as a source for the replacement value.

The FF relational operator can be used in Data Replace Criteria to assign a value to a Global variable.

The FF relational operator must be used when the global variable is to be compared against the value in another global variable or the results of a calculation.

The R relational operator will be specified as the comparison operator on the field-to-field operation to replace the value of the Global variable with the field, calculation or string defined by the field-to-field operation.

FM

Field mask. For more information, see Field Mask.

Set GLOBAL without selecting the record

Normal Selection Criteria processing for File-AID/MVS will cause the record to be selected when the condition named in the set is true.

With global variables, there are situations when you may want to define Selection Criteria to process data from the record without selecting the record for output. For example, you may want to save data from a record or set a condition in GLOBAL based on the record content but do not want the record selected to the Output file.

The processing of Selection Criteria has been modified slightly to accommodate this behavior. If the only actions taken within the Set are to set GLOBAL variables, the record will not be selected. If the record is to be selected for output, you must code another Set with the same condition to select the record.

Primary Commands

The following primary commands are valid:

END

Saves all changes and returns to the Formatted Selection Criteria screen.

SELECT (SEL)

Returns to the Global Selection Criteria screen.

VIEW (V)

Displays the View Criteria screen which is a keyword summary of the current settings for options, global variables, formatted, and unformatted selection criteria. See View Specification Keywords Screen.

CANCEL

Discards the entries.


 

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