Creating criteria using global fields


So far you created several change criteria sets without the use of global fields. In this section you learn how to create criteria using a global field (user variable) and Field-to-Field comparisons with the Data Solutions Criteria Sets utility (option S).

Using global fields makes it possible to perform the following Change Criteria functions:

  • Selection based on conditions in previous records
  • Selection based on counts or accumulated values
  • Logic controlled selection based on global indicators

Scenario:

The file DASAMP.SEGFILE has multiple records for each client. The client number info is on the first record, the Boat information is on the second and the business information on the third. The client number is to be used to access the Translate table replacement value but it is only stored in the first record.

The goal is to save the client number from the client number record and use it to translate the BOAT-MARINA-NAME in the second and the BUS-NAME in the third record.

Accessing the criteria set function (Option S)

The Criteria Set function is option S on the Data Solutions Primary Option Menu.

  1.  Enter S in the OPTION field on the Data Solutions Primary Option Menu (not shown here).
  2.  Press <Enter>. Data Solutions displays the Change Criteria - Dataset Specification screen.

Specifying the change criteria datasets

You must specify a partitioned dataset to save your change criteria members when using this function. The attributes of the data set are:

DSORG=PO,RECFM=VB,LRECL=300,BLKSIZE=x (x = 304 or more)

A sample Change Criteria dataset (DASAMP.CHGCRIT) is created for you with your other training files.

Create a new member "BOATNAME" to translate the boat marina and business name records with the last name and first name values of the EMPLOYEE translate table.

Use XREF layouts to define your Change Criteria.

When you define or maintain formatted field Change Criteria members, you must specify a single record layout or an XREF member.

Change Criteria - Dataset Specification screen

File-AID/Data Solutions  Change Criteria - Dataset Specification  -------------
COMMAND ===>                                                                  
                                                                               
Specify Criteria Information:                         
  Use existing criteria  ===> N          (Y = Yes; N= No)
  Criteria dataset name  ===> DASAMP.CHGCRIT                    
  Member name            ===> BOATNAME   (Blank or pattern for member list)
                                                                               
Specify Record Layout and XREF Information:                                    
   Record layout usage   ===> X
          (S = Single; X = XREF)              

   Record layout dataset ===> DASAMP.LAYOUTS
                         
   Member name           ===>       (Blank or pattern for member list)  

   XREF dataset name     ===> DASAMP.XREF
                                   
   Member name           ===> SEGFILE    (Blank or pattern for member list)  
                                                                               
Specify Business Rules or Field Exits Dataset Information:                     
   Dataset name ===>                                                            
                                                                               
-------------------------------------------------------------------------------
This function creates and maintains File-AID/Data Solutions Change criteria.
  1. Type N in the Use existing criteria field.
  2. Type DASAMP.CHGCRIT in the Criteria dataset name field.
  3. Type BOATNAME in the selection Member name field.

    If this member exists, you see the member and are able to specify and save changes. If this is a new member, you define and save a new criteria member. If you leave this field blank or use a mask (for example, MEM*), a member list is displayed from which you can select a member for criteria display and modification.

  4. Type X in the Record layout usage field.
  5. Type DASAMP.LAYOUTS in the Record layout dataset name field.
  6. Type DASAMP.XREF in the XREF dataset name field.
  7. Type SEGFILE in the XREF member name field.
  8. Press <Enter>. Data Solutions displays the Change Criteria Menu screen.

Defining global fields

The Change Criteria Menu lets you access all components of Change Criteria.

For this example, you are going to define global fields and use them in other Change Criteria options.

Criteria Menu option G gives you access to the Define Global Fields screen.

Change Criteria Menu Screen

File-AID/Data Solutions ---------- Criteria Menu ---  ---- CREATE NEW CRITERIA
OPTION ===> G
                                                                - Status -      
     0   OPTIONS                - Selection criteria options    default         
     G   GLOBAL                 - GLOBAL Fields                   0 fields      
     1   DATE AGING             - Aging criteria                  0 sets        
     2.1 EURO CONVERSION        - Euro Conversion criteria        0 sets        
     2.2 TRIANGULATION          - Currency Triangulation          0 sets        
     3.1 DATE PATTERN ANALYSIS  - Date Pattern criteria           0 sets       
     3.2 VALIDATION             - Validate criteria               0 sets        
     3.3 DATA ANALYSIS          - Data Analysis criteria          0 sets        
     4   TRANSLATOR             - Data Translator criteria        0 sets        
     5.1 GENERATOR              - Data Generator criteria         0 sets        
     5.2 PATTERN                - Pattern Data Generation         0 sets        
     6   FIELD EXITS            - Utilities criteria              0 sets        
     7   DATA ENCRYPTION        - Data Encryption Criteria        0 sets        
     8   REPLACE                - Data Replace Criteria           0 sets        
                                                                               
 Member list description ===> CHANGE BOAT & BUSINESS NAMES
                 
     Long    ===> USING GLOBAL FIELDS TO REPLACE BOAT AND BUSINESS NAMES WITH
                  ___
 Description ===> LAST AND FIRST NAMES FROM EMPLOYEE FILE.
                  ______________________                                                                                
 Commands: VIEW, SAVE, END, CANCEL,
  1.  Type G (GLOBAL Fields) in the OPTION field.
  2.  Type CHANGE BOAT & BUSINESS NAMES in the Member list description field.
  3.  Type USING GLOBAL FIELDS TO REPLACE BOAT AND BUSINESS NAMES WITH LAST AND FIRST NAMES FROM EMPLOYEE FILE. in the Long description field
  4.  Press <Enter>.

Specifying the global field definition

Before you can use a Global field in Change Criteria, you must first define it.

The following figure enables you to view, define and change user global fields. It lists all existing user variables and displays blank lines for definition of additional User variables. Global field names must start with & (ampersand) and they are retained in the order entered.

The example defines 3 Global fields.

Important

All references to the Global variable must be removed prior to deleting the Global variable.

Define Global Fields Screen

image2021-9-28_13-54-0.png

  1. Type &CLI-NUMBER for the Field name to identify the variable.
  2. Type C in the Char/Num data type column to specify character data.
  3. Type 5 in the Length column to specify character data length.
  4. Type &NAME-15 for the Field name to identify the variable.
  5. Type C in the Char/Num data type column to specify character data.
  6. Type 15 in the Length column to specify character data length.
  7. Type &NAME-10 for the Field name to identify the variable.
  8. Type C in the Char/Num data type column to specify character data.
  9. Type 10 in the Length column to specify character data length.
  10. Type END in the COMMAND field to save and exit the Define Global Fields Screen.
  11. Press <Enter>.

Activating global

After you defined the global fields you return to the Change Criteria Menu. You can use global fields in all Change Criteria Options.

Change Criteria Menu Screen - Selecting Option 8

File-AID/Data Solutions ---------- Criteria Menu ---  --------- UPDATE COMPLETE
OPTION ===> 8
                                                                - Status -      
     0   OPTIONS                - Selection criteria options    default         
     G   GLOBAL                 - GLOBAL Fields                   3 fields      
     1   DATE AGING             - Aging criteria                  0 sets       
     2.1 EURO CONVERSION        - Euro Conversion criteria        0 sets        
     2.2 TRIANGULATION          - Currency Triangulation          0 sets        
     3.1 DATE PATTERN ANALYSIS  - Date Pattern criteria           0 sets        
     3.2 VALIDATION             - Validate criteria               0 sets        
     3.3 DATA ANALYSIS          - Data Analysis criteria          0 sets        
     4   TRANSLATOR             - Data Translator criteria        0 sets        
     5.1 GENERATOR              - Data Generator criteria         0 sets        
     5.2 PATTERN                - Pattern Data Generation         0 sets        
     6   FIELD EXITS            - Utilities criteria              0 sets        
     7   DATA ENCRYPTION        - Data Encryption Criteria        0 sets        
     8   REPLACE                - Data Replace Criteria           0 sets        
                                                                               
 Member list description ===> CHANGE BOAT & BUSINESS NAMES                  
     Long    ===> USING GLOBAL FIELDS TO REPLACE BOAT AND BUSINESS NAMES WITH___
 Description ===> LAST AND FIRST NAMES FROM EMPLOYEE FILE.______________________
                                                                               
 Commands: VIEW, SAVE, END, CANCEL,
  1. Select Option 8 Replace.
  2. Press <Enter>.

Selecting the base segment

Because of the XREF you must specify which layout segment to use.

Selecting Base Layout

 File-AID/Data Solutions ---- XREF - SEGFILE ------------------ Row 1 to 6 of 6
 COMMAND ===>                                                  SCROLL ===> CSR  
                                                                               
 Member list description ===> SEGFILE XREF                                      
                                                                               
     Long    ===> FILE CONTAINS INS-BASE FOLLOWED BY ANY NUMBER OF ADDITIONAL   
 Description ===> TRAILER SEGMENTS IN ANY ORDER - BOAT CAR BUSINESS ETC.        
                                                                               
 Cmd   Member   Beginning Data-Name              Description     Status   Sets  
 --- ---------- ------------------------------ ---------------- -------- -------
 S
   SEGRECS    INS-BASE-FILE                                     BASE      0     
 _   SEGRECS    CLI-BOAT-DATA                                   SEGMENT   0     
 _   SEGRECS    CLI-BUSINESS-DATA                               SEGMENT   0     
 _   SEGRECS    CLI-CAR-DATA                                    SEGMENT   0     
 _   SEGRECS    CLI-HOME-DATA                                   SEGMENT   0     
 _   SEGRECS    CLI-LIFE-DATA                                   SEGMENT   0     
 ************************** END OF SELECTION CRITERIA **************************
  1. Type S to select the BASE layout.
  2. Press <Enter>.

Accessing global fields

After you selected the BASE layout, Data Solutions displays the Data Replace Criteria Screen. In order to assign a global field, use the GLOBAL primary command.

Data Replace Criteria Screen

 Action  Sets  Display  Show  Options  Menu  Help                             
 -------------------------------------------------------------------------------
 File-AID/Data Solutions ------- Data Replace Criteria -------------------------
 COMMAND ===> GBL
                                              SCROLL ===> CSR  
                                                                               
 SET  1 OF  1           INS-BASE-FILE                            GBL = N SEL = N
 ---- FIELD NUMBER/NAME ------ -FORMAT- RO --------- VALUE/PARAMETERS -------- +
 ******************************* TOP OF DATA ***********************************
 1 CLI-NUMBER                    5/AN     ** RECORD TYPE FIELD **               
 2 FILLER                        1/AN                                           
 3 CLI-FIRST-NAME               10/AN                                           
 4 CLI-MID-INIT                  1/AN                                           
 5 CLI-LAST-NAME                15/AN                                           
 6 CLI-OCCUPATION               20/AN                                           
 7 CLI-SMOKER                    1/AN                                           
 8 CLI-PHONE-NUMBER             10/AN                                           
 9 CLI-ADDRESS                  41/GRP                                          
   10 CLI-STREET                15/AN                                           
   11 CLI-CITY                  15/AN                                           
   12 CLI-STATE                  2/AN                                          
   13 CLI-ZIP-CODE               9/AN                                           
 14 FILLER                      20/AN                                           
 Valid RO: R, FF, FM                                                            
 Commands: SELect, GBL, View 


  1. Type GBL in the command line to access the Global Change Criteria.
  2. Press <Enter>.

Assigning Global Fields

The following figure lists all global variables that have been defined with option G of the Criteria Menu.

Use this screen to alter the values of global variables. The Relational Operators R (Replace) and FF (Field-to-Field) allow you to assign values to the Global variables.

So far, none of the global fields have values assigned to them. This example calls for the value of the field CLI-NUMBER to be assigned to &CLI-NUMBER.

Use the FF Relational Operator to change or replace the global field’s value with a value from a field in the record layout.

Global Change 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 &CLI-NUMBER                   5/AN   FF
 2 &NAME-15                     15/AN                                           
 3 &NAME-10                     10/AN                                           
 ***************************** BOTTOM OF DATA **********************************
                                                                               
                                                                              
                                                                               
                                                                               
                                                                               
                                                                              
                                                                               
                                                                              
                                                                               
                                                                               
 Valid RO: R, FF, FM                                                            
 Commands: SELect, RECord, View
  1. Type FF in the RO column next to the global field name &CLI-NUMBER.
  2. Press <Enter>.

Specifying field-to-field criteria

The following figure lists a field named “C O N S T A N T  V A L U E”, then all defined global variables, followed by all record layout fields.

When accessed from the Data Replace Criteria panel, following figure 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.

Our example will select the CLI-NUMBER field.

Field-to-Field Criteria

 File-AID/Data Solutions - Field-to-Field  Change Crit         SELECT ONE ENTRY
 Command ===>                                                  Scroll ===> CSR  
                                                                               
 Field: &CLI-NUMBER                      GLOBAL            Format: 5/CHAR       
 RO ===> R                                                                      
                                                                               
   Available Selections               Format     Constant /SUBSTR(pos:len)    OP
   ------------------------------- ------------- ---------------------------- --
 _ C O N S T A N T  V A L U E          N/A                                      
 _ &CLI-NUMBER                 GBL     5/CHAR                                   
 _ &NAME-15                    GBL    15/CHAR                                   
 _ &NAME-10                    GBL    10/CHAR                                   
 S CLI-NUMBER                          5/CHAR                                   
 _ FILLER                              1/CHAR                                   
 _ CLI-FIRST-NAME                     10/CHAR                                  
 _ CLI-MID-INIT                        1/CHAR                                   
 _ CLI-LAST-NAME                      15/CHAR                                  
 _ CLI-OCCUPATION                     20/CHAR                                   
 _ CLI-SMOKER                          1/CHAR                                   
 _ CLI-PHONE-NUMBER                   10/CHAR                                   
 _ CLI-ADDRESS                     --- GROUP ---                                
 _ CLI-STREET                         15/CHAR                                   
 _ CLI-CITY                           15/CHAR                                   
 _ CLI-STATE                           2/CHAR
  1. Type S in the Selection field next to “CLI-NUMBER“.
  2. Press <Enter>. The selected field now displays immediately below the "RO" line (see the following figure).
    Field-to-Field Criteria with Selected Field

    File-AID/Data Solutions - Field-to-Field  Change Crit        Row 1 to 16 of 18
     Command ===>                                                  Scroll ===> CSR  
                                                                                   
     Field: &CLI-NUMBER                      GLOBAL            Format: 5/CHAR       
     RO ===> R                                                                      
     FLD CLI-NUMBER                                                                 
       Available Selections               Format     Constant /SUBSTR(pos:len)    OP
       ------------------------------- ------------- ---------------------------- --
  3. Type END in the COMMAND field.

Reviewing data replace criteria

When returning to the “Data Replace Criteria” screen, the list of all global variables includes the data replace definition.

Because the example used Field-to-Field criteria, the FORMAT column for the global field now displays FF, the relational operator R, and the description of the operand fields.

Review the Value/Parameter for the global field &CLI-NUMBER. Also notice that the GBL status field now displays GBL = Y.

The END command completes the global field criteria definition and returns to the Record Data Replace Criteria panel.

Global Data Replace Criteria with Field-to-Field 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 = Y SEL = N
 ---- FIELD NUMBER/NAME ------ -FORMAT- RO --------- VALUE/PARAMETERS -------- +
 ******************************* TOP OF DATA ***********************************
 1 &CLI-NUMBER                       FF R  FLD(CLI-NUMBER);POS(1);LEN(5);TYP(C +
 2 &NAME-15                     15/AN                                           
 3 &NAME-10                     10/AN                                           
 ***************************** BOTTOM OF DATA **********************************
  1. Press <PF3> (END) to return to the Record Data Replace Criteria.
  2. Press <PF3> (END) again to return to the XREF Selection screen.

Reviewing XREF selection screen

When you return to the XREF Selection screen you can see that the Sets status now shows 1 criteria set for the BASE segment.

XREF Screen - Verifying Set Status

File-AID/Data Solutions ---- XREF - SEGFILE ------------------ Row 1 to 6 of 6
 COMMAND ===>                                                  SCROLL ===> CSR  
                                                                               
 Member list description ===> SEGFILE XREF                                      
                                                                               
     Long    ===> FILE CONTAINS INS-BASE FOLLOWED BY ANY NUMBER OF ADDITIONAL   
 Description ===> TRAILER SEGMENTS IN ANY ORDER - BOAT CAR BUSINESS ETC.        
                                                                               
 Cmd   Member   Beginning Data-Name              Description     Status   Sets  
 --- ---------- ------------------------------ ---------------- -------- -------
 _   SEGRECS    INS-BASE-FILE                                   BASE      1     
 _   SEGRECS    CLI-BOAT-DATA                                   SEGMENT   0     
 _   SEGRECS    CLI-BUSINESS-DATA                               SEGMENT   0     
 _   SEGRECS    CLI-CAR-DATA                                    SEGMENT   0    
 _   SEGRECS    CLI-HOME-DATA                                   SEGMENT   0     
 _   SEGRECS    CLI-LIFE-DATA                                   SEGMENT   0     
 ************************** END OF SELECTION CRITERIA **************************

Press <PF3> (END) to return to the Criteria Menu.

Defining translator criteria

So far in this example, only the value for the global field &CLI-NUMBER in the BASE segment has been set (Status for Option 8 Data Replace now shows 1 set).

Now, another criteria set needs to be defined to specify the change criteria for the CLI-BOAT segment using the Translator option.

Change Criteria Menu - Selecting Option 4

File-AID/Data Solutions ---------- Criteria Menu ---  --------- UPDATE COMPLETE
OPTION ===> 4
                                                                - Status -      
     0   OPTIONS                - Selection criteria options    default         
     G   GLOBAL                 - GLOBAL Fields                   3 fields      
     1   DATE AGING             - Aging criteria                  0 sets        
     2.1 EURO CONVERSION        - Euro Conversion criteria        0 sets       
     2.2 TRIANGULATION          - Currency Triangulation          0 sets        
     3.1 DATE PATTERN ANALYSIS  - Date Pattern criteria           0 sets        
     3.2 VALIDATION             - Validate criteria               0 sets        
     3.3 DATA ANALYSIS          - Data Analysis criteria          0 sets        
     4   TRANSLATOR             - Data Translator criteria        0 sets        
     5.1 GENERATOR              - Data Generator criteria         0 sets        
     5.2 PATTERN                - Pattern Data Generation         0 sets        
     6   FIELD EXITS            - Utilities criteria              0 sets       
     7   DATA ENCRYPTION        - Data Encryption Criteria        0 sets        
     8   REPLACE                - Data Replace Criteria           1 sets      
                                                                               
 Member list description ===> CHANGE BOAT & BUSINESS NAMES                  
     Long    ===> USING GLOBAL FIELDS TO REPLACE BOAT AND BUSINESS NAMES WITH___
 Description ===> LAST AND FIRST NAMES FROM EMPLOYEE FILE.______________________
                                                                               
 Commands: VIEW, SAVE, END, CANCEL, 
  1. Select Option 4 Translator.
  2. Press <Enter>. This displays the XREF - SEGFILE screen (see the following figure) where you specify which layout segment to use.
    Change Criteria Menu Screen - Selecting Option 2

     File-AID/Data Solutions ---- XREF - SEGFILE ------------------ Row 1 to 6 of 6
     COMMAND ===>                                                  SCROLL ===> CSR  
                                                                                   
     Member list description ===> SEGFILE XREF                                      
                                                                                   
         Long    ===> FILE CONTAINS INS-BASE FOLLOWED BY ANY NUMBER OF ADDITIONAL   
     Description ===> TRAILER SEGMENTS IN ANY ORDER - BOAT CAR BUSINESS ETC.        
                                                                                   
     Cmd   Member   Beginning Data-Name              Description     Status   Sets  
     --- ---------- ------------------------------ ---------------- -------- -------
     _   SEGRECS    INS-BASE-FILE                                   BASE      1     
     S   SEGRECS    CLI-BOAT-DATA                                   SEGMENT   0     
     _   SEGRECS    CLI-BUSINESS-DATA                               SEGMENT   0     
     _   SEGRECS    CLI-CAR-DATA                                    SEGMENT   0     
     _   SEGRECS    CLI-HOME-DATA                                   SEGMENT   0     
     _   SEGRECS    CLI-LIFE-DATA                                   SEGMENT   0     
     ************************** END OF SELECTION CRITERIA **************************
  3. Type S in front of CLI-BOAT-DATA.
  4. Press <Enter>.

Switching to global data translator criteria

The GLOBAL command changes the display to the GLOBAL Data Translator Criteria panel so you can use translation techniques with global fields.

Data Translator Criteria - GBL command

 Action  Sets  Display  Show  Options  Menu  Help                             
 -------------------------------------------------------------------------------
 File-AID/Data Solutions ------- Data Translator Crite  PROCESS ALL OCCURRENCES
 COMMAND ===> GBL                                              SCROLL ===> CSR  
 TABLE DATASET ===>                                                             
 SET  1 OF  1           CLI-BOAT-DATA                            GBL = N SEL = N
 ---- FIELD NUMBER/NAME ------ -FORMAT- RO --------- PARAMETERS ---------------+
 ******************************* TOP OF DATA ***********************************
 1 FILLER                        1/AN                                           
 2 BOAT-RECORD-TYPE-01           2/AN     ** RECORD TYPE FIELD **               
 3 BOAT-DATE-INSURED             6/AN                                           
 4 BOAT-REGISTER-NO              5/NUM                                          
 5 BOAT-INSURED-AMT              4/PS                                          
 6 BOAT-DOCK-NO                  3/NUM                                          
 7 BOAT-MARINA-NAME             30/AN                                           
 8 BOAT-NAME                    20/AN                                           
 9 FILLER                       36/AN                                           
 ***************************** BOTTOM OF DATA **********************************
                                                                               
                                                                               
                                                                               
 Valid RO: S = Search, K = Key, D = Direct pointer, H = Hash to key, U = Unique
           R = Result, SR, KR, DR, HR, UR (for both), EP, FM                    
 Commands: SELect, GBL, View
  1. Type GBL in the command line.
  2. Press <Enter>.

Specifying data translation criteria

This example uses the EMPLOYEE data set as the translate table, the Direct Pointer routine for the &CLI-NUMBER global field and the Result routine for the &NAME-15 and &NAME-10 global fields.

Global Data Translator Screen - Specifying Translate Routines

 Action  Sets  Display  Show  Options  Menu  Help                             
 -------------------------------------------------------------------------------
 File-AID/Data Solutions ------- Data Translator Criteria ----------------------
 COMMAND ===>                                                  SCROLL ===> CSR  
 TABLE DATASET ===> DASAMP.EMPLOYEE                                   
 SET  1 OF  1           GLOBAL-FIELDS                            GBL = N SEL = N
 ---- FIELD NUMBER/NAME ------ -FORMAT- RO --------- PARAMETERS ---------------+
 ******************************* TOP OF DATA ***********************************
 1 &CLI-NUMBER                   5/AN   D                                       
 2 &NAME-15                     15/AN   R                                      
 3 &NAME-10                     10/AN   R
                                      
 ***************************** BOTTOM OF DATA **********************************
                                                                               
                                                                               
                                                                               
                                                                              
                                                                               
                                                                               
                                                                              
                                                                               
                                                                               
 Valid RO: S = Search, K = Key, D = Direct pointer, H = Hash to key, U = Unique
           R = Result, SR, KR, DR, HR, UR (for both), EP, FM                    
 Commands: SELect, RECord, View
  1. Type DASAMP.EMPLOYEE in the TABLE DATASET field.
  2. Type D in the RO column next to the field name &CLI-NUMBER.
  3. Type R in the RO column next to the field name &NAME-15.
  4. Type R in the RO column next to the field name &NAME-10.
  5. Press <Enter>.

Verifying Direct Pointer Field Parameters

Verify that data type and length for the global field are correct.

Direct Pointer Field Parameters window

image2021-9-28_14-12-59.png

Press <PF3>.

Specifying result field parameters

For global field &NAME-15 specify the starting position (6) of the Last Name field in the translate table dataset EMPLOYEE.

Result Field Parameters window with &NAME-15

image2021-9-28_14-13-31.png

  1. Type 6 in the Location field.
  2.  Press <PF3> .

For global field &NAME-10 specify the starting position (21) of the First Name field in the translate table dataset EMPLOYEE.

Result Field Parameters window with &NAME-10

image2021-9-28_14-14-17.png

  1. Type 21 in the Location field.
  2. Press <PF3>.

Reviewing translate criteria

The Parameters field now displays the parameters you specified for the translation routines for each global field. Review them.

You can use short cut commands to switch between Criteria screens. When using multiple commands, separate them with a semicolon (;).

To return to the Record Data Translator Criteria and then switch to the Data Replace Criteria, enter the RECORD and DATAREPL commands.

Global Data Translator Screen - Translate Routines Defined

 Action  Sets  Display  Show  Options  Menu  Help                             
 -------------------------------------------------------------------------------
 File-AID/Data Solutions ------- Data Translator Criteria ----------------------
 COMMAND ===> REC;DATAREPL                                     SCROLL ===> CSR  
 TABLE DATASET ===> DASAMP.EMPLOYEE                                   
 SET  1 OF  1           GLOBAL-FIELDS                            GBL = Y SEL = N
 ---- FIELD NUMBER/NAME ------ -FORMAT- RO --------- PARAMETERS ---------------+
 ******************************* TOP OF DATA ***********************************
 1 &CLI-NUMBER                   5/AN   D  FLEN(00005)                         
 2 &NAME-15                     15/AN   R  RLOC(00006);RLEN(00015);RTYPE(CHAR);+
 3 &NAME-10                     10/AN   R  RLOC(00021);RLEN(00010);RTYPE(CHAR);+
 ***************************** BOTTOM OF DATA **********************************
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
 Valid RO: S = Search, K = Key, D = Direct pointer, H = Hash to key, U = Unique
           R = Result, SR, KR, DR, HR, UR (for both), EP, FM                    
 Commands: SELect, RECord, View
  1. Type REC;DATAREPL in the command line
  2.  Press <Enter>.

Replacing values of a field with global field values

In the Data Replace Criteria screen you specify a replace value (R) or source (FF) for a specified field. In this example, replace the value of BOAT-MARINA-NAME with a concatenated string of the Last Name, First Name global field translate results.

Data Replace Criteria - Specifying Field-to-Field

Action  Sets  Display  Show  Options  Menu  Help                             
 -------------------------------------------------------------------------------
 File-AID/Data Solutions ------- Data Replace Criteria  PROCESS ALL OCCURRENCES
 COMMAND ===>                                                  SCROLL ===> CSR  
                                                                               
 SET  2 OF  2           CLI-BOAT-DATA                            GBL = N SEL = N
 ---- FIELD NUMBER/NAME ------ -FORMAT- RO --------- VALUE/PARAMETERS -------- +
 ******************************* TOP OF DATA ***********************************
 1 FILLER                        1/AN                                           
 2 BOAT-RECORD-TYPE-01           2/AN     ** RECORD TYPE FIELD **               
 3 BOAT-DATE-INSURED             6/AN                                           
 4 BOAT-REGISTER-NO              5/NUM                                          
 5 BOAT-INSURED-AMT              4/PS                                           
 6 BOAT-DOCK-NO                  3/NUM                                          
 7 BOAT-MARINA-NAME             30/AN   FF                                      
 8 BOAT-NAME                    20/AN                                           
 9 FILLER                       36/AN                                           
 ***************************** BOTTOM OF DATA **********************************
                                                                               
                                                                               
                                                                               
                                                                               
 Valid RO: R, FF, FM                                                            
 Commands: SELect, GBL, View 
  1. Type FF in RO column next to the field name BOAT-MARINA-NAME.
  2. Press <Enter>.

Building string concatenation

In the “Field-to-Field Criteria” screen you can replace the value of the selected field with the value from another field or a combination of fields, including global 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.

Our example first selects the &NAME-15 global field (last name), then inserts a comma, and adds the &NAME-10 global field (first name).

Field-to-Field Change Criteria - String Concatenation


 File-AID/Data Solutions - Field-to-Field  Change Crit         SELECT ONE ENTRY
 Command ===>                                                  Scroll ===> CSR  
                                                                               
 Field: BOAT-MARINA-NAME                 Position: 22      Format: 30/CHAR      
 RO ===> R                                                                      
                                                                               
   Available Selections               Format     Constant /SUBSTR(pos:len)    OP
   ------------------------------- ------------- ---------------------------- --
 _ C O N S T A N T  V A L U E          N/A                                      
 _ &CLI-NUMBER                 GBL     5/CHAR                                   
 S &NAME-15                    GBL    15/CHAR                                 ||
 _ &NAME-10                    GBL    10/CHAR                                   
 _ FILLER                              1/CHAR                                   
 _ BOAT-RECORD-TYPE-01                 2/CHAR                                   
 _ BOAT-DATE-INSURED                   6/CHAR                                   
 _ BOAT-REGISTER-NO                    5/FIXPIC                                 
 _ BOAT-INSURED-AMT                    4/FIXDEC                                
 _ BOAT-DOCK-NO                        3/FIXPIC                                 
 _ BOAT-MARINA-NAME                   30/CHAR                                   
 _ BOAT-NAME                          20/CHAR                                   
 _ FILLER                             36/CHAR                                   
 ******************************* END OF CRITERIA **************************** 
  1. Type S in front of &NAME-15.
  2. Type || in the OP column for the &NAME-15 global field.
  3. Press <Enter>. The selected global field and the || operator now displays immediately below the "RO" line (see the following figure).

    Field-to-Field Change Criteria - Adding Constant Value

     File-AID/Data Solutions - Field-to-Field  Change Crit         SELECT ONE ENTRY
     Command ===>                                                  Scroll ===> CSR  
                                                                                   
     Field: BOAT-MARINA-NAME                 Position: 22      Format: 30/CHAR      
     RO ===> R                                                                      
     STR &NAME-15 ||                                                                
       Available Selections               Format     Constant /SUBSTR(pos:len)    OP
       ------------------------------- ------------- ---------------------------- --
     S C O N S T A N T  V A L U E          N/A       “, “                         ||
     _ &CLI-NUMBER                 GBL     5/CHAR                                   
     _ &NAME-15                    GBL    15/CHAR                                 
     _ &NAME-10                    GBL    10/CHAR                                   
     _ FILLER                              1/CHAR 
  4. Type S in front of “C O N S T A N T  V A L U E” field.
  5. Type ", " in the Constant column.
  6. Type || in the OP column for the “C O N S T A N T  V A L U E” field.
  7. Press <Enter>. The entered constant value and the || operator are now added to the display immediately below the "RO" line (see the following figure).

    Field-to-Field Change Criteria - Adding &NAME-10 to String

    File-AID/Data Solutions - Field-to-Field  Change Crit         SELECT ONE ENTRY
     Command ===>                                                  Scroll ===> CSR  
                                                                                   
     Field: BOAT-MARINA-NAME                 Position: 22      Format: 30/CHAR      
     RO ===> R                                                                      
     STR &NAME-15 || ", " ||                                                        
       Available Selections               Format     Constant /SUBSTR(pos:len)    OP
       ------------------------------- ------------- ---------------------------- --
     _ C O N S T A N T  V A L U E          N/A                                    
     _ &CLI-NUMBER                 GBL     5/CHAR                                   
     _ &NAME-15                    GBL    15/CHAR                                 
     S &NAME-10                    GBL    10/CHAR                                   
     _ FILLER                              1/CHAR 
  8. Type S in front of &NAME-10.
  9. Press <Enter>. The updated string displays immediately below the "RO" line (see the following figure).

    Field-to-Field Change Criteria - Completed String

     File-AID/Data Solutions - Field-to-Field  Change Crit        Row 1 to 13 of 13
     Command ===>                                                  Scroll ===> CSR  
                                                                                   
     Field: BOAT-MARINA-NAME                 Position: 22      Format: 30/CHAR      
     RO ===> R                                                                      
     STR &NAME-15 || ", " || &NAME-10                                               
       Available Selections               Format     Constant /SUBSTR(pos:len)    OP
       ------------------------------- ------------- ---------------------------- --
     _ C O N S T A N T  V A L U E          N/A                                    
     _ &CLI-NUMBER                 GBL     5/CHAR                                   
     _ &NAME-15                    GBL    15/CHAR                                 
     _ &NAME-10                    GBL    10/CHAR                                   
     _ FILLER                              1/CHAR
  10. Press <PF3> .

    Reviewing field-to-field criteria

    The Parameters field now displays the FF (Field-to-Field) parameters for the Data Replace. Review them.

    Data Replace Criteria Screen - Completed Field-to-Field Operation

     Action  Sets  Display  Show  Options  Menu  Help                             
     -------------------------------------------------------------------------------
     File-AID/Data Solutions ------- Data Replace Criteria -------------------------
     COMMAND ===>                                                  SCROLL ===> CSR  
                                                                                   
     SET  2 OF  2           CLI-BOAT-DATA                            GBL = N SEL = N
     ---- FIELD NUMBER/NAME ------ -FORMAT- RO --------- VALUE/PARAMETERS -------- +
     ******************************* TOP OF DATA ***********************************
     1 FILLER                        1/AN                                           
     2 BOAT-RECORD-TYPE-01           2/AN     ** RECORD TYPE FIELD **               
     3 BOAT-DATE-INSURED             6/AN                                           
     4 BOAT-REGISTER-NO              5/NUM                                          
     5 BOAT-INSURED-AMT              4/PS                                           
     6 BOAT-DOCK-NO                  3/NUM                                          
     7 BOAT-MARINA-NAME                  FF R  STR(GBL(&NAME-15);OP(||);CON(, );OP +
     8 BOAT-NAME                    20/AN                                           
     9 FILLER                       36/AN                                           
     ***************************** BOTTOM OF DATA **********************************
                                                                                   
                                                                                   
                                                                                   
                                                                                  
     Valid RO: R, FF, FM                                                            
     Commands: SELect, GBL, View
  11. Press <PF3> .

Defining translator criteria for business name

After you defined the Change Criteria for the Boat Marina name in the Client Boat Data segment, you need to do the same for the Business name field in the Client Business Data segment.

XREF Screen - Selecting CLI-BUSINESS-DATA

image2021-9-28_14-27-36.png

  1. Type S in front of CLI-BUSINESS-DATA
  2. Press <Enter>.

    Data Solutions returns to the Data Replace Criteria (see the following figure). However, you first need to switch to the Data Translator Criteria to define the data translator criteria.

    Data Replace Criteria Screen - Switching to Translator

     Action  Sets  Display  Show  Options  Menu  Help                             
     -------------------------------------------------------------------------------
     File-AID/Data Solutions ------- Data Replace Criteria -------------------------
    COMMAND ===> DATATRAN                                         SCROLL ===> CSR  
                                                                                   
     SET  1 OF  1           CLI-BUSINESS-DATA                        GBL = N SEL = N
     ---- FIELD NUMBER/NAME ------ -FORMAT- RO --------- VALUE/PARAMETERS -------- +
     ******************************* TOP OF DATA ***********************************
     1 FILLER                        1/AN                                           
     2 BUSINESS-RECORD-TYPE-02       2/AN     ** RECORD TYPE FIELD **               
     3 BUS-DATE-INSURED              6/AN                                           
     4 BUS-NAME                     30/AN                                           
     5 BUS-INSURED-AMT               6/PS                                           
     6 BUS-ADDRESS                  30/AN                                           
     7 BUS-PHONE-NUMBER             10/NUM                                          
     8 FILLER                       40/AN                                           
                                (POS 38-40)
  3. Type DATATRAN in the command line.
  4. Press <Enter>.

Switching to global data translator criteria

The GLOBAL command changes the display to the GLOBAL Data Translator Criteria panel so you can use translation techniques with global fields.

Data Translator Criteria - GBL command

 Action  Sets  Display  Show  Options  Menu  Help                             
 -------------------------------------------------------------------------------
 File-AID/Data Solutions ------- Data Translator Criteria ----------------------
 COMMAND ===> GBL                                              SCROLL ===> CSR  
 TABLE DATASET ===> 'USERID1.DASAMP.EMPLOYEE'
 SET  1 OF  1           CLI-BUSINESS-DATA                        GBL = N SEL = N
 ---- FIELD NUMBER/NAME ------ -FORMAT- RO --------- VALUE/PARAMETERS -------- +
 ******************************* TOP OF DATA ***********************************
 1 FILLER                        1/AN                                           
 2 BUSINESS-RECORD-TYPE-02       2/AN     ** RECORD TYPE FIELD **               
 3 BUS-DATE-INSURED              6/AN                                           
 4 BUS-NAME                     30/AN                                           
 5 BUS-INSURED-AMT               6/PS                                           
 6 BUS-ADDRESS                  30/AN                                           
 7 BUS-PHONE-NUMBER             10/NUM                                          
 8 FILLER                       40/AN                                           
                            (POS 38-40)                                         
 ***************************** BOTTOM OF DATA **********************************
                                                                               
                                                                               
                                                                               
 Valid RO: S = Search, K = Key, D = Direct pointer, H = Hash to key, U = Unique
           R = Result, SR, KR, DR, HR, UR (for both), EP, FM                    
 Commands: SELect, GBL, View
  1. Type GBL in the command line.
  2. Press <Enter>.

Specifying data translation criteria

This example uses the EMPLOYEE data set as the translate table, the Direct Pointer routine for the &CLI-NUMBER global field and the Result routine for the &NAME-15 and &NAME-10 global fields.

After you defined the global field you return to the Change Criteria Menu. You can use global fields all Change Criteria Options.

Global Data Translator Screen - Specifying Translate Routines

 Action  Sets  Display  Show  Options  Menu  Help                             
 -------------------------------------------------------------------------------
 File-AID/Data Solutions ------- Data Translator Criteria ----------------------
 COMMAND ===>                                                  SCROLL ===> CSR  
 TABLE DATASET ===> 'USERID1.DASAMP.EMPLOYEE'                                   
 SET  1 OF  1           GLOBAL-FIELDS                            GBL = N SEL = N
 ---- FIELD NUMBER/NAME ------ -FORMAT- RO --------- PARAMETERS ---------------+
 ******************************* TOP OF DATA ***********************************
 1 &CLI-NUMBER                   5/AN   D                                     
 2 &NAME-15                     15/AN   R                  
 3 &NAME-10                     10/AN   R
                                      
 ***************************** BOTTOM OF DATA **********************************
                                                                               
                                                                               
                                                                               
                                                                              
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
 Valid RO: S = Search, K = Key, D = Direct pointer, H = Hash to key, U = Unique
           R = Result, SR, KR, DR, HR, UR (for both), EP, FM                    
 Commands: SELect, RECord, View
  1. Type D in the RO column next to the field name &CLI-NUMBER.
  2. Type R in the RO column next to the field name &NAME-15.
  3. Type R in the RO column next to the field name &NAME-10.
  4. Press <Enter>.

Verifying direct pointer field parameters

Verify that data type and length for the global field are correct.

Direct Pointer Field Parameters window

image2021-9-28_14-33-8.png


Press <PF3>.

Specifying result field parameters

For global field &NAME-15 specify the starting position (6) of the Last Name field in the translate table dataset EMPLOYEE.

Result Field Parameters window with &NAME-15

image2021-9-28_14-33-45.png

  1. Type 6 in the Location field.
  2. Press <PF3>.

For global field &NAME-10 specify the starting position (21) of the First Name field in the translate table dataset EMPLOYEE.

Result Field Parameters window with &NAME-10

image2021-9-28_14-34-43.png

  1. Type 21 in the Location field.
  2. Press <PF3>.

Reviewing translate criteria

The Parameters field now displays the parameters you specified for the translation routines for each global field. Review them.

You can use short cut commands to switch between Criteria screens. When using multiple commands, separate them with a semicolon (;).

To return to the Record Data Translator Criteria and then switch to the Data Replace Criteria, enter the RECORD and DATAREPL commands.

Global Data Translator Screen - Translate Routines Defined

 Action  Sets  Display  Show  Options  Menu  Help                             
 -------------------------------------------------------------------------------
 File-AID/Data Solutions ------- Data Translator Criteria ----------------------
 COMMAND ===> REC;DATAREPL                                     SCROLL ===> CSR  
 TABLE DATASET ===> DASAMP.EMPLOYEE                                   
 SET  1 OF  1           GLOBAL-FIELDS                            GBL = Y SEL = N
 ---- FIELD NUMBER/NAME ------ -FORMAT- RO --------- PARAMETERS ---------------+
 ******************************* TOP OF DATA ***********************************
 1 &CLI-NUMBER                   5/AN   D  FLEN(00005)                         
 2 &NAME-15                     15/AN   R  RLOC(00006);RLEN(00015);RTYPE(CHAR);+
 3 &NAME-10                     10/AN   R  RLOC(00021);RLEN(00010);RTYPE(CHAR);+
 ***************************** BOTTOM OF DATA **********************************
                                                                               
                                                                              
                                                                               
                                                                               
                                                                               
                                                                              
                                                                               
                                                                               
                                                                               
 Valid RO: S = Search, K = Key, D = Direct pointer, H = Hash to key, U = Unique
           R = Result, SR, KR, DR, HR, UR (for both), EP, FM                    
 Commands: SELect, RECord, View
  1. Type REC;DATAREPL in the command line
  2. Press <Enter>.

Replacing values of a field with global field values

In the Data Replace Criteria screen you specify a replace value (R) or source (FF) for a specified field. In this example, replace the value of BUS-NAME with a concatenated string of the Last Name, First Name global field translate results.

Data Replace Criteria - Specifying Field-to-Field

Action  Sets  Display  Show  Options  Menu  Help                             
 -------------------------------------------------------------------------------
 File-AID/Data Solutions ------- Data Replace Criteria  PROCESS ALL OCCURRENCES
 COMMAND ===>                                                  SCROLL ===> CSR  
                                                                               
 SET  2 OF  2           CLI-BOAT-DATA                            GBL = N SEL = N
 ---- FIELD NUMBER/NAME ------ -FORMAT- RO --------- VALUE/PARAMETERS -------- +
******************************* TOP OF DATA ***********************************
 1 FILLER                        1/AN                                           
 2 BUSINESS-RECORD-TYPE-02       2/AN     ** RECORD TYPE FIELD **               
 3 BUS-DATE-INSURED              6/AN                                           
 4 BUS-NAME                     30/AN   FF                                    
 5 BUS-INSURED-AMT               6/PS                                           
 6 BUS-ADDRESS                  30/AN                                           
 7 BUS-PHONE-NUMBER             10/NUM                                          
 8 FILLER                       40/AN                                           
                            (POS 38-40)                                         
 ***************************** BOTTOM OF DATA **********************************
                                                                              
                                                                               
                                                                              
                                                                               
 Valid RO: R, FF, FM                                                            
 Commands: SELect, GBL, View 
  1. Type FF in RO column next to the field name BUS-NAME.
  2. Press <Enter>.

Building string concatenation

In the “Field-to-Field Criteria” screen you can replace the value of the selected field with the value from another field or a combination of fields, including global 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.

Our example first selects the &NAME-15 global field (last name), then inserts a comma, and adds the &NAME-10 global field (first name).

Field-to-Field Change Criteria - String Concatenation

File-AID/Data Solutions - Field-to-Field  Change Crit         SELECT ONE ENTRY
 Command ===>                                                  Scroll ===> CSR  
                                                                               
 Field: BUS-NAME                         Position: 10      Format: 30/CHAR      
 RO ===> R                                                                      
                                                                               
   Available Selections               Format     Constant /SUBSTR(pos:len)    OP
   ------------------------------- ------------- ---------------------------- --
 _ C O N S T A N T  V A L U E          N/A                                      
 _ &CLI-NUMBER                 GBL     5/CHAR                                   
 S &NAME-15                    GBL    15/CHAR                                 ||
 _ &NAME-10                    GBL    10/CHAR                                   
 _ FILLER                              1/CHAR                                   
 _ BUSINESS-RECORD-TYPE-02             2/CHAR                                   
 _ BUS-DATE-INSURED                    6/CHAR                                  
 _ BUS-NAME                           30/CHAR                                   
 _ BUS-INSURED-AMT                     6/FIXDEC                                
 _ BUS-ADDRESS                        30/CHAR                                   
 _ BUS-PHONE-NUMBER                   10/FIXPIC                                
 _ FILLER                             40/CHAR                                   
 ******************************* END OF CRITERIA ****************************
  1. Type S in front of &NAME-15.
  2. Type || in the OP column for the &NAME-15 global field.
  3. Press <Enter>. The selected global field and the || operator now displays immediately below the "RO" line (see the following figure).

    Field-to-Field Change Criteria - Adding Constant Value

     File-AID/Data Solutions - Field-to-Field  Change Criteria    Row 1 to 12 of 12
     Command ===>                                                  Scroll ===> CSR  
                                                                                   
     Field: BUS-NAME                         Position: 10      Format: 30/CHAR      
     RO ===> R                                                                      
     STR &NAME-15 ||                                                                
       Available Selections               Format     Constant /SUBSTR(pos:len)    OP
       ------------------------------- ------------- ---------------------------- --
     S C O N S T A N T  V A L U E          N/A       ", "                         ||
     _ &CLI-NUMBER                 GBL     5/CHAR                                   
     _ &NAME-15                    GBL    15/CHAR                                   
     _ &NAME-10                    GBL    10/CHAR                                   
     _ FILLER                              1/CHAR 
  4. Type S in front of “C O N S T A N T  V A L U E” field.
  5. Type ", " in the Constant column.
  6. Type || in the OP column for the “C O N S T A N T  V A L U E” field.
  7. Press <Enter>. The entered constant value and the || operator are now added to the display immediately below the "RO" line (see the following figure).

    Field-to-Field Change Criteria - Adding &NAME-10 to String

     File-AID/Data Solutions - Field-to-Field  Change Criteria    Row 1 to 12 of 12
     Command ===>                                                  Scroll ===> CSR  
                                                                                   
     Field: BUS-NAME                         Position: 10      Format: 30/CHAR      
     RO ===> R                                                                      
     STR &NAME-15 || ", " ||                                                        
       Available Selections               Format     Constant /SUBSTR(pos:len)    OP
       ------------------------------- ------------- ---------------------------- --
     _ C O N S T A N T  V A L U E          N/A                                      
     _ &CLI-NUMBER                 GBL     5/CHAR                                   
     _ &NAME-15                    GBL    15/CHAR                                   
     S &NAME-10                    GBL    10/CHAR                                   
     _ FILLER                              1/CHAR 
  8. Type S in front of &NAME-10.
  9. Press <Enter>. The updated string displays immediately below the "RO" line (see the following figure).

    Field-to-Field Change Criteria - Completed String

     File-AID/Data Solutions - Field-to-Field  Change Criteria    Row 1 to 12 of 12
     Command ===>                                                  Scroll ===> CSR  
                                                                                   
     Field: BUS-NAME                         Position: 10      Format: 30/CHAR      
     RO ===> R                                                                      
     STR &NAME-15 || ", " || &NAME-10                                               
       Available Selections               Format     Constant /SUBSTR(pos:len)    OP
       ------------------------------- ------------- ---------------------------- --
     _ C O N S T A N T  V A L U E          N/A                                      
     _ &CLI-NUMBER                 GBL     5/CHAR                                   
     _ &NAME-15                    GBL    15/CHAR                                   
     _ &NAME-10                    GBL    10/CHAR                                   
     _ FILLER                              1/CHAR
  10. Press <PF3>.

    Reviewing field-to-field criteria

    The Parameters field now displays the FF (Field-to-Field) parameters for the Data Replace. Review them.

    Data Replace Criteria Screen - Completed Field-to-Field Operation

     Action  Sets  Display  Show  Options  Menu  Help                             
     -------------------------------------------------------------------------------
     File-AID/Data Solutions ------- Data Replace Criteria -------------------------
     COMMAND ===>                                                  SCROLL ===> CSR  
                                                                                   
     SET  2 OF  2           CLI-BUSINESS-DATA                        GBL = N SEL = N
     ---- FIELD NUMBER/NAME ------ -FORMAT- RO --------- VALUE/PARAMETERS -------- +
     ******************************* TOP OF DATA ***********************************
     1 FILLER                        1/AN                                           
     2 BUSINESS-RECORD-TYPE-02       2/AN     ** RECORD TYPE FIELD **               
     3 BUS-DATE-INSURED              6/AN                                           
     4 BUS-NAME                          FF R  STR(GBL(&NAME-15);OP(||);CON(, );OP +
     5 BUS-INSURED-AMT               6/PS                                           
     6 BUS-ADDRESS                  30/AN                                           
     7 BUS-PHONE-NUMBER             10/NUM                                          
     8 FILLER                       40/AN                                           
                                (POS 38-40)                                         
     ***************************** BOTTOM OF DATA **********************************
                                                                                   
                                                                                   
                                                                                   
                                                                                   
     Valid RO: R, FF, FM                                                            
     Commands: SELect, GBL, View
  11. Press <PF3> twice to return to the Criteria Menu.

Saving your change criteria

Notice that the status for GLOBAL now shows “3 fields”, TRANSLATOR status shows "2 sets" and REPLACE status shows "3 sets" to reflect the change criteria you just defined.

Enter the SAVE command to permanently store the Change Criteria in the specified member.

Change Criteria Menu. Specifying SAVE to Save Change Criteria.

 File-AID/Data Solutions ---------- Criteria Menu ---  --------- UPDATE COMPLETE
 OPTION ===> SAVE                                                          
                                                                - Status -      
     0   OPTIONS                - Selection criteria options    default         
     G   GLOBAL                 - GLOBAL Fields                   3 fields      
     1   DATE AGING             - Aging criteria                  0 sets        
     2.1 EURO CONVERSION        - Euro Conversion criteria        0 sets        
     2.2 TRIANGULATION          - Currency Triangulation          0 sets        
     3.1 DATE PATTERN ANALYSIS  - Date Pattern criteria           0 sets        
     3.2 VALIDATION             - Validate criteria               0 sets        
     3.3 DATA ANALYSIS          - Data Analysis criteria          0 sets        
     4   TRANSLATOR             - Data Translator criteria        2 sets        
     5.1 GENERATOR              - Data Generator criteria         0 sets        
     5.2 PATTERN                - Pattern Data Generation         0 sets        
     6   FIELD EXITS            - Utilities criteria              0 sets        
     7   DATA ENCRYPTION        - Data Encryption Criteria        0 sets        
     8   REPLACE                - Data Replace Criteria           3 sets        
                                                                               
 Member list description ===> CHANGE BOAT & BUSINESS NAMES                      
     Long    ===> USING GLOBAL FIELDS TO REPLACE BOAT AND BUSINESS NAMES WITH   
 Description ===> LAST AND FIRST NAMES FROM EMPLOYEE FILE.                      
                                                                               
 Commands: VIEW, SAVE, END, CANCEL, 
  1. Type SAVE in the OPTION field.
  2. Press <Enter>. The Change Criteria Dataset Specification displays (see the following figure).

    Change Criteria Dataset Specification Screen. Saving Criteria

    File-AID/Data Solutions  Change Criteria Dataset Specification  ---------------
     COMMAND ===>                                                  SCROLL ===> CSR  
                                                                                   
     Specify SAVE Change Criteria Information:             
        Criteria dataset name    ===> 'USERID1.DASAMP.CHGCRIT'                     
        Member name              ===> BOATNAME (Blank or pattern for member list)   
                                                                                   
                                                                                   










     Use ENTER to save into the specified dataset                                   
     Use END   to stop SAVE processing and continue 
  3. The Criteria dataset name should be prefilled with the name specified in Change Criteria - Dataset Specification Screen. If not, type DASAMP.CHGCRIT in the Criteria dataset name field.
  4. The Criteria member name should be prefilled with the name specified in Change Criteria - Dataset Specification Screen. If not, type BOATNAME in the selection Member name field.
  5. Press <Enter>. Data Solutions displays the Change Criteria Menu screen as illustrated in the following figure.

Viewing your change criteria

When you enter the VIEW primary command from the Change Criteria menu, or any other Criteria panel, Data Solutions displays your currently defined Change Criteria.

Change Criteria Menu. Specifying VIEW to View Change Criteria.

 File-AID/Data Solutions ---------- Criteria Menu ---  - Criteria BOATNAME added
 OPTION ===> VIEW                                                          
                                                                - Status -      
     0   OPTIONS                - Selection criteria options    default         
     G   GLOBAL                 - GLOBAL Fields                   3 fields      
     1   DATE AGING             - Aging criteria                  0 sets        
     2.1 EURO CONVERSION        - Euro Conversion criteria        0 sets        
     2.2 TRIANGULATION          - Currency Triangulation          0 sets        
     3.1 DATE PATTERN ANALYSIS  - Date Pattern criteria           0 sets        
     3.2 VALIDATION             - Validate criteria               0 sets        
     3.3 DATA ANALYSIS          - Data Analysis criteria          0 sets        
     4   TRANSLATOR             - Data Translator criteria        2 sets        
     5.1 GENERATOR              - Data Generator criteria         0 sets        
     5.2 PATTERN                - Pattern Data Generation         0 sets        
     6   FIELD EXITS            - Utilities criteria              0 sets        
     7   DATA ENCRYPTION        - Data Encryption Criteria        0 sets        
     8   REPLACE                - Data Replace Criteria           3 sets        
                                                                               
 Member list description ===> CHANGE BOAT & BUSINESS NAMES                      
     Long    ===> USING GLOBAL FIELDS TO REPLACE BOAT AND BUSINESS NAMES WITH   
 Description ===> LAST AND FIRST NAMES FROM EMPLOYEE FILE.                      
                                                                               
 Commands: VIEW, SAVE, END, CANCEL,
  1. Type VIEW in the OPTION field.
  2. Press <Enter>.

Reviewing your change criteria

Scroll the display so you can see the complete Change Criteria. It defines three global fields and five criteria sets.

To execute the change criteria, enter the short cut =4, if enabled (see Specify Jump Command Default), to access the Data Translator option or press PF3 twice and enter option 4 Translator from the File-AID/Data Solutions Primary Menu.

View Change Criteria. Specifying =4 to switch to the Data Translator function.

 File-AID/Data Solutions --------- View Criteria ------------ Row 1 to 20 of 85
 COMMAND ===> =4                                               SCROLL ===> CSR  
 Use END to exit View Display                                                   
                                                                               
 ****************************** TOP OF CRITERIA *******************************
 DEFINE BLOCKS=SELECTION,                                                       
                                                                               
 DESCRIPTION ="CHANGE BOAT & BUSINESS NAMES",                                   
 DESCRIPTION1="USING GLOBAL FIELDS TO REPLACE BOAT AND BUSINESS NAMES WITH",    
 DESCRIPTION2="LAST AND FIRST NAMES FROM EMPLOYEE FILE.",                       
                                                                               
        SELECTION_DSNAME=USERID1.DASAMP1.CHGCRIT,                               
        SELECTION_MBRNAME=BOAT,                                                 
                                                                               
        LAYOUT_DSNAME=USERID1.DASAMP1.LAYOUTS,                                  
        XREF_DSNAME=USERID1.DASAMP1.XREF,                                       
        XREF_MBRNAME=SEGFILE,                                                   
                                                                               
        INITIAL_SKIP=0,                                                         
        THEN_SELECT=1,                                                          
        THEN_SKIP=0,                                                            
                                                                               
        MAXIMUM_TO_SEARCH=ALL,                                                  
        MAXIMUM_TO_SELECT=ALL
 GLOBAL FIELD_NAME=&CLI-NUMBER,LENGTH=5,TYPE=C
 GLOBAL FIELD_NAME=&NAME-15,LENGTH=15,TYPE=C                
 GLOBAL FIELD_NAME=&NAME-10,LENGTH=10,TYPE=C                
                                                          
 SELECT SET=1,LAYOUT=INS-BASE-FILE,FUNCTION=DATA_REPLACE,   
        REFER_TO_XREF_BASE=1                                
  CHGGBL                                                    
        FIELD_NAME=&CLI-NUMBER,                             
        OPERATOR=R ,                                        
        FIELD_TO_FIELD=Y,                                   
        TYPE=T,VALUE=FLD(CLI-NUMBER);POS(1);LEN(5);TYP(C)   
                                                           
 SELECT SET=2,LAYOUT=CLI-BOAT-DATA,FUNCTION=DATA_TRANSLATOR,
        TABLE_DSN='USERID1.DASAMP.EMPLOYEE',                
        REFER_TO_XREF_BASE=1,                               
        REFER_TO_XREF_SEGMENT=1                             
  CHGGBL                                                   
        FIELD_NAME=&CLI-NUMBER,                             
        OPERATOR=D ,                                        
        TYPE=T,VALUE=FLEN(00005)                            
  CHGGBL 
        FIELD_NAME=&NAME-15,                                               
        OPERATOR=R ,                                                       
        TYPE=T,VALUE=RLOC(00006);RLEN(00015);RTYPE(CHAR);FLEN(00015)       
  CHGGBL                                                                   
        FIELD_NAME=&NAME-10,                                               
        OPERATOR=R ,                                                       
        TYPE=T,VALUE=RLOC(00021);RLEN(00010);RTYPE(CHAR);FLEN(00010)       

                                                                         
 SELECT SET=3,LAYOUT=CLI-BOAT-DATA,FUNCTION=DATA_REPLACE,                  
        REFER_TO_XREF_BASE=1,                                              
        REFER_TO_XREF_SEGMENT=1                                            
  CHG                                                                      
        FIELD_NAME=BOAT-MARINA-NAME,                                       
        POSITION=22,LENGTH=30,OPERATOR=R ,                                 
        FIELD_TO_FIELD=Y,                                                  
        TYPE=T,VALUE=STR(GBL(&NAME-15);OP(||);CON(, );OP(||);GBL(&NAME-10))
                                                                          
 SELECT SET=4,LAYOUT=CLI-BUSINESS-DATA,FUNCTION=DATA_TRANSLATOR,           
        TABLE_DSN='USERID1.DASAMP.EMPLOYEE',                               
        REFER_TO_XREF_BASE=1, 
        REFER_TO_XREF_SEGMENT=2                                     
  CHGGBL                                                            
        FIELD_NAME=&CLI-NUMBER,                                     
        OPERATOR=D ,                                                
        TYPE=T,VALUE=FLEN(00005)                                    
  CHGGBL                                                            
        FIELD_NAME=&NAME-15,                                        
        OPERATOR=R ,                                                
        TYPE=T,VALUE=RLOC(00006);RLEN(00015);RTYPE(CHAR);FLEN(00015)
  CHGGBL                                                            
        FIELD_NAME=&NAME-10,                                       
        OPERATOR=R ,                                                
        TYPE=T,VALUE=RLOC(00021);RLEN(00010);RTYPE(CHAR);FLEN(00010)
                                                                   
 SELECT SET=5,LAYOUT=CLI-BUSINESS-DATA,FUNCTION=DATA_REPLACE,       
        REFER_TO_XREF_BASE=1,                                      
        REFER_TO_XREF_SEGMENT=2                                     
  CHG                                                               
        FIELD_NAME=BUS-NAME,                                        
        POSITION=10,LENGTH=30,OPERATOR=R ,
        FIELD_TO_FIELD=Y,                                                    
        TYPE=T,VALUE=STR(GBL(&NAME-15);OP(||);CON(, );OP(||);GBL(&NAME-10))  
                                                                            
 ******************************* END OF CRITERIA ****************************
  1. Type =4 in the command line.
  2. Press <Enter>.

Executing the change criteria

Specifying the input dataset

The last data set you referenced in any Data Solutions function or utility is automatically displayed in the Input Dataset name field.

The Change Criteria dataset and member you last referenced (in this case, through the Change Criteria function) is displayed in the lower portion of the screen.

In this example, specify a Y in the Use existing criteria field.

Input Dataset Specification Screen. Use Existing Change Criteria.

File-AID/Data Solutions - Input Dataset Specification -------------------------
 COMMAND ===>                                                  SCROLL ===> CSR  
                                                                               
 Specify Input Dataset Information:                                             
   Dataset name           ===> DASAMP.SEGFILE                        
   Member name            ===>            (Blank or pattern for member list)    
   Disposition            ===> OLD        (OLD or SHR)                          
                                                                               
                                                                               
 Specify Record Layout and XREF Information:                                    
   Record layout usage    ===> X          (S = Single; X = XREF)                
   Record layout dataset  ===> DASAMP.LAYOUTS                         
   Member name            ===>            (Blank or pattern for member list)    
   XREF dataset name      ===> DASAMP1.XREF                            
   Member name            ===> SEGFILE    (Blank or pattern for member list)    
                                                                               
 Specify Criteria Information:                         
   Use existing criteria  ===> Y          (Y = Yes; N = No)
   Criteria dataset name  ===> DASAMP.CHGCRIT                        
   Member name            ===> BOATNAME   (Blank or pattern for member list)    

 Specify Business Rules or Field Exits Dataset Information:                     
   Dataset name ===> 
  1. Type DASAMP.SEGFILE in the Dataset name field.
  2. Type an X in the Record layout usage field to indicate that you are using a XREF layout members that describe your data records.
  3. Type the data set name DASAMP.LAYOUTS in the Record layout dataset field.
  4. Leave the layout Member name field blank.
  5. Type the data set name DASAMP.XREF in the XREF dataset name field.
  6.  Type SEGFILE in the XREF Member name field.
  7. Type a Y in the Use existing criteria field to indicate that you want to use saved Change Criteria. 
  8. Type DASAMP.CHGCRIT in the Selection dataset name field.
  9.  Type BOATNAME in the Member name field.
  10.  Press <Enter>

Change criteria menu

Quickly verify that the change criteria you defined earlier in this exercise is displayed.

To continue with the data translation process, press <Enter>.

Change Criteria Menu. Verifying Status.

 File-AID/Data Solutions ---------- Criteria Menu ---  USERID1.DASAMP.CHGCRIT(BO
 OPTION ===>                                                          
                                                                - Status -      
     0   OPTIONS                - Selection criteria options    default         
     G   GLOBAL                 - GLOBAL Fields                   3 fields      
     1   DATE AGING             - Aging criteria                  0 sets        
     2.1 EURO CONVERSION        - Euro Conversion criteria        0 sets        
     2.2 TRIANGULATION          - Currency Triangulation          0 sets        
     3.1 DATE PATTERN ANALYSIS  - Date Pattern criteria           0 sets        
     3.2 VALIDATION             - Validate criteria               0 sets        
     3.3 DATA ANALYSIS          - Data Analysis criteria          0 sets        
     4   TRANSLATOR             - Data Translator criteria        2 sets        
     5.1 GENERATOR              - Data Generator criteria         0 sets        
     5.2 PATTERN                - Pattern Data Generation         0 sets        
     6   FIELD EXITS            - Utilities criteria              0 sets        
     7   DATA ENCRYPTION        - Data Encryption Criteria        0 sets        
     8   REPLACE                - Data Replace Criteria           3 sets        
                                                                               
 Member list description ===> CHANGE BOAT & BUSINESS NAMES                      
     Long    ===> USING GLOBAL FIELDS TO REPLACE BOAT AND BUSINESS NAMES WITH   
 Description ===> LAST AND FIRST NAMES FROM EMPLOYEE FILE.                      
                                                                               
 Commands: VIEW, SAVE, END, CANCEL, ENTER to continue 

Press <Enter>.

Specifying output

File-AID/Data Solutions displays the Output Specification screen, shown in the following figure. The screen displays the input dataset name previously specified.

Output Specification Screen

 File-AID/Data Solutions ------- Output Specification --------------------------
 COMMAND ===>                                                                   
                                                                               
 Input dataset: USERID1.DASAMP.SEGFILE                                                                                                                   
 Specify Output Processing Option:                                              
   Option             ===> C  (A=ANALYZE; C=COPY; U=UPDATE/PREVIEW)             
   Create audit trail ===> N  (Y=Chgd record only; N=No; A=All records in Batch)
   Audit trail prefix ===>                    
 Specify Output Dataset Information (COPY ONLY):                                
   Dataset name   ===> DASAMP.SEGBOAT                                           
   Disposition    ===> NEW                (OLD or NEW)     
   New VSAM Type  ===>                    (K=KSDS,E=ESDS,R=RRDS,L=LDS,Z=ZFS)
                                          (Blank = Input Dataset Type)    
                                                                                                        
 Specify PDS(E) COPY options:                                                   
   Copy empty members from input ===> NO     (Y = Yes; N = No)                  
   Replace like-named members    ===> YES    (Y = Yes; N = No)                  
   Rename copied members mask    ===>                                           
                                                                               
 Use ENTER to continue or END to return to Criteria Menu
 Use VIEW command to display criteria summary
 Use SAVE command to write criteria request
 Use CANCEL to restart at Input Specification Panel
  1. Type DASAMP.SEGBOAT in the Specify Output Dataset Information (COPY ONLY) field.
  2. Specify NEW in the Disposition field.
  3. Press <Enter>.

Allocating the output dataset for copying

File-AID/Data Solutions displays the Allocate New Dataset screen, as shown in the following figure. Data Solutions models the new output data set type and allocation parameters on those of the input dataset.

Allocate New Dataset screen

 File-AID/Data Solutions   Allocate New Dataset  -------------------------------
 COMMAND ===>                                                                   
                                                                               
 Dataset name: USERID1.DASAMP.SEGBOAT                                           
                                                                               
   Management Class    ===> SAMPLE@S   (Blank for default)                      
   Storage Class       ===> STDDODFW   (Blank for default)                      
   Data Class          ===>            (Blank for default)                      
                                       Specify one of the following two fields  
    Volume serial      ===> PRD935     (Blank for authorized default volume)    
    Generic unit       ===>            (Generic group name or unit)             
    Space units        ===> TRKS       (BLKS; TRKS; CYLS; KB; or MB)            
    Primary quantity   ===> 1          (In above units)                         
    Secondary quantity ===> 1          (In above units)                         
    Directory quantity ===> 0          (Partitioned only)                       
    Record format      ===> VB                                                  
    Record length      ===> 1000                                                
    Block size         ===> 2000                                                
    Expiration date    ===>            (YYYY/MM/DD or blank)                    
    Dataset Name Type  ===>            (Library, PDS, LArge, or blank)          
                                                                               
    Number of Volumes  ===> N          (N=None; Y=Multivol; or volume count

You can modify the allocation parameters by overtyping them. Then press <Enter>.

Specifying the copy execution options

File-AID/Data Solutions displays the Copy Execution Options screen, as shown in the following figure. You may perform the Copy processing online at your terminal or generate JCL for Batch execution to run your request as a background job in MVS.

The Maximum invalid fields field allows you to specify the number of invalid fields to allow Data Solutions to discard (skip) before cancelling the translate process. If 1 (one) is specified, Data Solutions stops when it encounters the first invalid field. 0 (zero) or All processes the entire file and discards (skips) all invalid fields.

In addition, you can save the change criteria that you just specified. Specify Y in the Save change criteria field and enter a change criteria dataset and member name. You can enter an optional member description that Data Solutions displays on the change criteria dataset member list. The longer description field information is added as comments to the change criteria member.

COPY Execution Options Screen

 File-AID/Data Solutions ------- COPY Execution Options ------------------------
 COMMAND ===>                                                                   
                                                                               
 Specify Execution Options:                                                     
   Process online or batch  ===> O        (O = Online; B = Batch)
   Maximum invalid fields   ===> ALL      (All or number of invalid fields)
   Display invalid fields   ===> Y        (Y = Yes; N = No)
   Maximum changes          ===> ALL      (All or number of changes)  
                                                                               
                                                                               
 Specify Change Criteria Information:                  
   Save change criteria     ===> N        (Y = Yes; N = No)
   Change criteria dataset  ===> 'USERID1.DASAMP1.CHGCRIT'                      
   Member name              ===> BOATNAME (Blank or pattern for member list)    
                                                                              
 Member description ===> CHANGE BOAT & BUSINESS NAMES__                         
     Long    ===> USING GLOBAL FIELDS TO REPLACE BOAT AND BUSINESS NAMES WITH___
 Description ===> LAST AND FIRST NAMES FROM EMPLOYEE FILE.______________________

 Use ENTER to execute COPY
 Use VIEW command to display criteria summary    
 Use END to return to Output Specification Panel                                
 Use CANCEL command to restart at Input Specification Panel 
  1. Press <Enter>.

    A report screen (see the following figure) opens displaying the number of records read and selected, the number of fields changed, and the number of invalid items.

  2. Press <PF3> (END) to process.

Copy Report Screen

 Menu  Utilities  Compilers  Help                                             
 -------------------------------------------------------------------------------
 BROWSE    USERID1.DASOLUTN.WF.D09231.T140357                 19 RECORDS COPIED
 Command ===>                                                  Scroll ===> CSR  
********************************* Top of Data **********************************
SET  1 REPL-====================================================================
SET  1 REPL-Records Read 19, Selected 19, Fields Replaced 19, Invalid 0         
SET  2 TRAN-====================================================================
SET  2 TRAN-Records Read 19, Selected 16, Converted 16, Invalid 0               
SET  3 REPL-====================================================================
SET  3 REPL-Records Read 19, Selected 16, Fields Replaced 16, Invalid 0         
SET  4 TRAN-====================================================================
SET  4 TRAN-Records Read 19, Selected 3, Converted 3, Invalid 0                 
SET  5 REPL-====================================================================
SET  5 REPL-Records Read 19, Selected 3, Fields Replaced 3, Invalid 0           
                                                                               
******************************** Bottom of Data ********************************

File-AID/Data Solutions displays the Copy Print Report screen, as shown in the following figure.

Copy Print Report Screen

 File-AID/Data Solutions -----  COPY Print Report   --------- 19 RECORDS COPIED
 COMMAND ===>


  Print execution report  ===> N   (Y = Yes; N = No)  

  Instructions:  

  Use ENTER to perform above action and return to the initial screen
  Use END to exit without PRINT

Press <PF3> (END) to finish.

Related topics

 

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