Monday, December 12, 2011

File-Aid: Selectively view the fields

Lets we have a below employee file and we want to view only the EMP-NO and EMP-SALARY fields

File-AID - Browse - TSUBAQF.TSTS.EMP -------------------------------- COL 1  43
 COMMAND ===> disp off all                                     SCROLL ===> CSR 
 RECORD:       1                   EMPLOYEE-RECORD               LENGTH:      43
 ---- FIELD NUMBER/NAME ------ -FORMAT- ----+----1----+----2----+----3----+----4
 ******************************** TOP OF DATA **********************************
 1 EMP-NO                        5/NUM  1111                                   
 2 EMP-FIRST-NAME               10/AN   AAAA                                   
 3 EMP-LAST-NAME                10/AN   BBBB                                   
 4 EMP-DEPARTMENT               10/AN   FINANCE                                
 5 EMP-SALARY                    8/SNUM 5000.12                                
 ****************************** BOTTOM OF DATA *********************************

First hide all the fields using "DISP OFF ALL" command as shown below.

File-AID - Browse - TSUBAQF.TSTS.EMP -------------------------------- COL 1  43
 COMMAND ===> disp off all                                     SCROLL ===> CSR 
 RECORD:       1                   EMPLOYEE-RECORD               LENGTH:      43
 ---- FIELD NUMBER/NAME ------ -FORMAT- ----+----1----+----2----+----3----+----4
 ******************************** TOP OF DATA **********************************
 1 EMP-NO                        5/NUM  1111                                   
 2 EMP-FIRST-NAME               10/AN   AAAA                                   
 3 EMP-LAST-NAME                10/AN   BBBB                                   
 4 EMP-DEPARTMENT               10/AN   FINANCE                                
 5 EMP-SALARY                    8/SNUM 5000.12                                
 ****************************** BOTTOM OF DATA *********************************

All the fields are hidden as shown below.

File-AID - Browse - TSUBAQF.TSTS.EMP -------------------------- NAME NOT FOUND
 COMMAND ===>                                                  SCROLL ===> CSR 
 RECORD:       1                   EMPLOYEE-RECORD               LENGTH:      43
 ---- FIELD NUMBER/NAME ------ -FORMAT- ----+----1----+----2----+----3----+----4
 ******************************** TOP OF DATA **********************************
 ****************************** BOTTOM OF DATA *********************************

Next enter "L EMP-NO" as shown below.

File-AID - Browse - TSUBAQF.TSTS.EMP -------------------------- NAME NOT FOUND
 COMMAND ===> l emp-no                                         SCROLL ===> CSR 
 RECORD:       1                   EMPLOYEE-RECORD               LENGTH:      43
 ---- FIELD NUMBER/NAME ------ -FORMAT- ----+----1----+----2----+----3----+----4
 ******************************** TOP OF DATA **********************************
 ****************************** BOTTOM OF DATA *********************************

Only EMP-NO field is displayed

File-AID - Browse - TSUBAQF.TSTS.EMP --------------------------------- COL 1  5
 COMMAND ===>                                                  SCROLL ===> CSR 
 RECORD:       1                   EMPLOYEE-RECORD               LENGTH:      43
 ---- FIELD NUMBER/NAME ------ -FORMAT- ----+----1----+----2----+----3----+----4
 1 EMP-NO                        5/NUM  1111                                   
 ****************************** BOTTOM OF DATA *********************************

Now type "L EMP-SALARY" to unhide the salary field.

File-AID - Browse - TSUBAQF.TSTS.EMP -------------------------------- COL 1  43
 COMMAND ===>                                                  SCROLL ===> CSR 
 RECORD:       1                   EMPLOYEE-RECORD               LENGTH:      43
 ---- FIELD NUMBER/NAME ------ -FORMAT- ----+----1----+----2----+----3----+----4
 ******************************** TOP OF DATA **********************************
 1 EMP-NO                        5/NUM  1111                                   
 5 EMP-SALARY                    8/SNUM 5000.12                                
 ****************************** BOTTOM OF DATA *********************************

If you want to view the columns vertically, enter "VFMT" command as shown below.

File-AID - Browse - TSUBAQF.TSTS.EMP -------------------------------- COL 1  43
 COMMAND ===> vfmt                                             SCROLL ===> CSR 
 RECORD:       1                   EMPLOYEE-RECORD               LENGTH:      43
 ---- FIELD NUMBER/NAME ------ -FORMAT- ----+----1----+----2----+----3----+----4
 ******************************** TOP OF DATA **********************************
 1 EMP-NO                        5/NUM  1111                                   
 5 EMP-SALARY                    8/SNUM 5000.12                                
 ****************************** BOTTOM OF DATA *********************************

Data is displayed vertically.

File-AID - Browse - TSUBAQF.TSTS.EMP ---------------------- LINE 0000 COL 1  43
 COMMAND ===>                                                  SCROLL ===> CSR 
EMP-NO   EMP-SALARY                                                            
5/NUM    8/SNUM                                                                
(1-5)    (36-43)                                                               
1------- 5---------                                                            
********************************* TOP OF DATA **********************-CAPS ON-**
    1111    5000.12                                                            
    2222    3000.12                                                            
    3333    3000.12                                                             
    4444    6000.12                                                            
******************************** BOTTOM OF DATA ********************-CAPS ON-**

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.