Example 2. CR (free-format criteria) prefix command

This example shows how to enter redefines criteria using the CR (free-format criteria) prefix command.

  Process   Options   Help                                                      
 ───────────────────────────────────────────────────────────────────────────────
 File Manager                 Field Selection/Edit                 Line 1 of 11 
 Command ===> _____________________________________________________ Scroll CSR  
                                                                                
 ----------- Criteria - Enter 1 or 2 to specify expression by field ----------- 
 1 Id :                                                                        + 
 2 Sel:                                                                        + 
 Offset      0                                                      CCSID _____ 
 Cmd Seq SHE Ref Field Name                           Picture  Type Start Length
                 ****  Top of data  ****                                        
 ___ ___       1 1 REDEFINES-LAYOUT                             AN      1      5
 ___ ___       2  2 REDEF-TYPE                        X         AN      1      1
 cr            3  2 DATA-A                                      AN      2      4
 ___ ___       4   3 DATA-A1                          XX        AN      2      2
 ___ ___       5   3 DATA-A2                          XX        AN      4      2
 cr            6  2 DATA-B REDEFINES DATA-A                     AN      2      4
 ___ ___       7   3 DATA-B1                          99        ZD      2      2
 ___ ___       8   3 DATA-B2                          99        ZD      4      2
 cr            9  2 DATA-C REDEFINES DATA-A                     AN      2      4
 ___ ___      10   3 DATA-C1                          S9(4)     BI      2      2
 ___ ___      11   3 DATA-C2                          S9(4)     BI      4      2
                 ****  End of data  ****                                        

Type the CR command next to a field that has a REDEFINES clause or is the target of a REDEFINES clause and then press Enter.

The REDEFINES Criteria panel is displayed for the first field, DATA-A.

  Process   Options   Help                                                      
 ───────────────────────────────────────────────────────────────────────────────
 File Manager         REDEFINES Criteria: DATA-A                   Line 1 of 11 
 Command ===> _____________________________________________________ Scroll CSR  
                                                                                
 -------------- Criteria - Enter 1 to specify expression by field ------------- 
 1: #2 = 'A'                                                                  + 
 Offset 0                                                                       
 Cmd Seq SHE Ref Field Name                           Picture  Type Start Length
                 ****  Top of data  ****                                        
               1 1 REDEFINES-LAYOUT                             AN      1      5
               2  2 REDEF-TYPE                        X         AN      1      1
               3  2 DATA-A                                      AN      2      4
               4   3 DATA-A1                          XX        AN      2      2
               5   3 DATA-A2                          XX        AN      4      2
               6  2 DATA-B REDEFINES DATA-A                     AN      2      4
               7   3 DATA-B1                          99        ZD      2      2
               8   3 DATA-B2                          99        ZD      4      2
               9  2 DATA-C REDEFINES DATA-A                     AN      2      4
              10   3 DATA-C1                          S9(4)     BI      2      2
              11   3 DATA-C2                          S9(4)     BI      4      2
                 ****  End of data  ****
                                                   

Enter the expression #2 = 'A' as shown in the sample panel for DATA-A definition and then press F3.

Process   Options   Help                                                      
 ───────────────────────────────────────────────────────────────────────────────
 File Manager         REDEFINES Criteria: DATA-B                   Line 1 of 11 
 Command ===> _____________________________________________________ Scroll CSR  
                                                                                
 -------------- Criteria - Enter 1 to specify expression by field ------------- 
 1: #2 = 'B'                                                                  + 
 Offset 0                                                                       
 Cmd Seq SHE Ref Field Name                           Picture  Type Start Length
                 ****  Top of data  ****                                        
               1 1 REDEFINES-LAYOUT                             AN      1      5
               2  2 REDEF-TYPE                        X         AN      1      1
               3  2 DATA-A                                      AN      2      4
               4   3 DATA-A1                          XX        AN      2      2
               5   3 DATA-A2                          XX        AN      4      2
               6  2 DATA-B REDEFINES DATA-A                     AN      2      4
               7   3 DATA-B1                          99        ZD      2      2
               8   3 DATA-B2                          99        ZD      4      2
               9  2 DATA-C REDEFINES DATA-A                     AN      2      4
              10   3 DATA-C1                          S9(4)     BI      2      2
              11   3 DATA-C2                          S9(4)     BI      4      2
                 ****  End of data  ****                                        

Enter the expression #2 = 'B' as shown in the sample panel for DATA-B definition and then press F3.

  Process   Options   Help                                                      
 ───────────────────────────────────────────────────────────────────────────────
 File Manager         REDEFINES Criteria: DATA-C                   Line 1 of 11 
 Command ===> _____________________________________________________ Scroll CSR  
                                                                                
 -------------- Criteria - Enter 1 to specify expression by field ------------- 
 1: #2 = 'C'                                                                  + 
 Offset 0                                                                       
 Cmd Seq SHE Ref Field Name                           Picture  Type Start Length
                 ****  Top of data  ****                                        
               1 1 REDEFINES-LAYOUT                             AN      1      5
               2  2 REDEF-TYPE                        X         AN      1      1
               3  2 DATA-A                                      AN      2      4
               4   3 DATA-A1                          XX        AN      2      2
               5   3 DATA-A2                          XX        AN      4      2
               6  2 DATA-B REDEFINES DATA-A                     AN      2      4
               7   3 DATA-B1                          99        ZD      2      2
               8   3 DATA-B2                          99        ZD      4      2
               9  2 DATA-C REDEFINES DATA-A                     AN      2      4
              10   3 DATA-C1                          S9(4)     BI      2      2
              11   3 DATA-C2                          S9(4)     BI      4      2
                 ****  End of data  ****                                        

Enter the expression #2 = 'C' as shown in the sample panel for DATA-C definition and then press F3.

  Process   Options   Help                                                      
 ───────────────────────────────────────────────────────────────────────────────
 File Manager                 Field Selection/Edit                 Line 1 of 11 
 Command ===> _____________________________________________________ Scroll CSR  
                                                                                
 ----------- Criteria - Enter 1 or 2 to specify expression by field ----------- 
 1 Id : _____________________________________________________________________ + 
 2 Sel:                                                                        + 
 Offset      0                                                      CCSID _____ 
 Cmd Seq SHE Ref Field Name                           Picture  Type Start Length
                 ****  Top of data  ****                                        
 ___ ___       1 1 REDEFINES-LAYOUT                             AN      1      5
 ___ ___       2  2 REDEF-TYPE                        X         AN      1      1
 ___ ___       3  2 DATA-A                                      AN      2      4
 ___ ___       4   3 DATA-A1                          XX        AN      2      2
 ___ ___       5   3 DATA-A2                          XX        AN      4      2
 ___ ___       6  2 DATA-B REDEFINES DATA-A                     AN      2      4
 ___ ___       7   3 DATA-B1                          99        ZD      2      2
 ___ ___       8   3 DATA-B2                          99        ZD      4      2
 ___ ___       9  2 DATA-C REDEFINES DATA-A                     AN      2      4
 ___ ___      10   3 DATA-C1                          S9(4)     BI      2      2
 ___ ___      11   3 DATA-C2                          S9(4)     BI      4      2
                 ****  End of data  ****                                        
                                                                                
Note: The fields that have redefines criteria (fields 3, 6, and 9) will have their reference number highlighted in red on the Field Selection/Edit panel.