Example

The following example demonstrates the following:
  1. How to select the "DEMO1" index directory list and retrieve a list of previous searches and resubmit the indexed search for words matching "SET*SG".
  2. How to display a list of the data sets containing occurrences of the word "SETMSG".
  3. How to display an indexed report restricted to data set names and member names.
  4. How to drill-down to the first occurrence of the word "SETMSG" in a specific member.
  5. How to navigate to the full Index Search Report from either the Word column or the Hits column.
  6. How to navigate to a specific line number of the member.
  7. How to produce a nested Indexed Search Report for the word "APCT004C"
  8. How to issue the / primary command with the cursor positioned on the "APCT004C" word display a nested Index Search panel with the matching words.
  1. Select "DEMO1" from the Index List panel.
      Process   Options   Help                                                      
     ───────────────────────────────────────────────────────────────────────────────
     Index DEMO1      EXECs, Panels, Messages, and Skeletons   Row 00001 of 00000   
     Command ===>                                                       Scroll CSR  
                                                                                    
     Search:                                                                  +     
     Word                                           Hits      Data sets Members     
     *                                                                              
     <---+----10---+----2----+----3----+----4----+> <---+---> <---+---> <---+--->   
     ****  End of data  ****                                                        
    
  2. To retrieve a previous search argument, press Enter on the blank search argument. The list of previous search words are listed under History Value. Select the first search history value.
      Process   Options   Help                                                      
     ───────────────────────────────────────────────────────────────────────────────
      File Manager             History Selection List            Row 00001 of 00050 
     Command ===>                                                       Scroll CSR  
                                                                                    
       History Value                                                                
     s SET*SG                                                                       
       SETM                                                                         
       SET                                                                          
       SETMSG                                                                       
       SCLM                                                                         
       FMN                                                                          
       SET & ALLOC*                                                                 
    
  3. With the "SET*SG" word selected, press Enter to re-issue the search for the "SET*SG" word.
      Process   Options   Help                                                      
     ───────────────────────────────────────────────────────────────────────────────
     Index DEMO1      EXECs, Panels, Messages, and Skeletons   Row 00001 of 00002   
     Command ===>                                                       Scroll CSR  
                                                                                    
     Search:  SET*SG                                                          +     
     Word                                           Hits      Data sets Members     
     *                                                                              
     <---+----10---+----2----+----3----+----4----+> <---+---> <---+---> <---+--->   
     SET_ERROR_MSG                                          4         1         2   
     SETMSG                                               157         3        46   
     ****  End of data  ****                                                        
    
  4. Position the cursor to SETMSG data sets and press Enter to list the data sets that contain the word SETMSG.
       File  Edit  Edit_Settings  Menu  Utilities  Compilers  Test  Help            
     ───────────────────────────────────────────────────────────────────────────────
     VIEW       SYS22214.T172727.RA000.TYRONED.R0200234         Columns 00001 00072 
     Command ===>                                                  Scroll ===> CSR  
     ****** ***************************** Top of Data ******************************
     000001 FMN.DEMO01.EXEC                                                         
     000002 FMN.EXEC                                                                
     000003 FMN.PANELS                                                              
     ****** **************************** Bottom of Data ****************************
    
  5. Press the F3 function key and the position the cursor to a number in the Member column. In this example, the cursor is positioned to 46.
      Process   Options   Help                                                      
     ───────────────────────────────────────────────────────────────────────────────
     Index DEMO1      EXECs, Panels, Messages, and Skeletons   Row 00001 of 00002   
     Command ===>                                                       Scroll CSR  
                                                                                    
     Search:  SET*SG                                                          +     
     Word                                           Hits      Data sets Members     
     *                                                                              
     <---+----10---+----2----+----3----+----4----+> <---+---> <---+---> <---+--->   
     SET_ERROR_MSG                                          4         1         2   
     SETMSG                                               157         3        46   
     ****  End of data  ****                                                        
    
  6. Press Enter to display an Indexed Search Report restricted to data set names and member names.
       File  Edit  Edit_Settings  Menu  Utilities  Compilers  Test  Help            
     ───────────────────────────────────────────────────────────────────────────────
     VIEW        Indexed Search Report      Index DEMO1             Col 00001 00072 
     Command ===>                                                  Scroll ===> CSR  
     ****** ***************************** Top of Data ******************************
     000001 ------------------------------------------------------------------------
     000002 >Data Set: FMN.DEMO01.EXEC                                              
     000003  >Member : APCTRTC                                                      
     000004  >Member : APCT2AZB                                                     
     000005  >Member : APCT2AZO                                                     
     000006  >Member : APCT2AZP                                                     
     000007  >Member : BCK2AZ                                                       
     000008  >Member : BPCT2AZ                                                      
     000009  >Member : CAPART5                                                      
     000010  >Member : CAPART6                                                      
     000011  >Member : CNEXT                                                        
     000012  >Member : CRUZP                                                        
     000013  >Member : CRZT                                                         
     000014  >Member : DUPCHK                                                       
     
    
  7. Press Enter against any member to navigate to the first line containing an occurrence of the "SETMSG" word in that member.
       File  Edit  Edit_Settings  Menu  Utilities  Compilers  Test  Help            
     ───────────────────────────────────────────────────────────────────────────────
     VIEW       FMN.DEMO01.EXEC(APCTRTC)                        Columns 00001 00072 
     Command ===>                                                  Scroll ===> CSR  
     000351   'TBEND STATTAB'                                                       
     000352 end                                                                     
     000353 else do;                                                                
     000354   address ISPEXEC                                                       
     000355     'SETMSG MSG(APCT017I)'    /* no information available */            
     000356 end;                                                                    
     000357 return                                                                  
     000358 /* ----------------------------------------------- */                   
     000359 /* Issue a DBUTIL report to get various statistics */                   
     000360 /* ----------------------------------------------- */                   
     000361 get_report:                                                             
     000362 SCLMqual = "'"||userid()||'.LOCK.SCAN'                                  
     000363 Sclmrept = sclmqual||'.REPT'||''''                                      
     000364 Sclmarch = sclmqual||'.ARCH'||''''                                      
     000365 Sclmmsg  = sclmqual||'.MSGS'||''''                                      
     000366                                                                         
     000367                                           /* get rid of the old ones */ 
     000368   address TSO                                                           
     000369   if sysdsn(SCLMrept) = 'OK' then                                       
     000370     'DELETE' sclmrept                                                   
    
  8. Press the F3 function key twice and press Enter at either the Word or Hits column to navigate to the full Indexed Search Report.
      Process   Options   Help                                                      
     ───────────────────────────────────────────────────────────────────────────────
     Index DEMO1      EXECs, Panels, Messages, and Skeletons   Row 00001 of 00002   
     Command ===>                                                       Scroll CSR  
                                                                                    
     Search:  SET*SG                                                          +     
     Word                                           Hits      Data sets Members     
     *                                                                              
     <---+----10---+----2----+----3----+----4----+> <---+---> <---+---> <---+--->   
     SET_ERROR_MSG                                          4         1         2   
     SETMSG                                               157         3        46   
     ****  End of data  ****                                                        
    
  9. Press Enter to display list of occurrences.
       File  Edit  Edit_Settings  Menu  Utilities  Compilers  Test  Help            
     ───────────────────────────────────────────────────────────────────────────────
     VIEW        Indexed Search Report      Index DEMO1             Col 00001 00072 
     Command ===>                                                  Scroll ===> CSR  
     ****** ***************************** Top of Data ******************************
     000001 ------------------------------------------------------------------------
     000002 >Data Set: FMN.DEMO01.EXEC                                              
     000003  >Member : APCTRTC                                                      
     000004       355      'SETMSG MSG(APCT017I)'    /* no information available */ 
     000005       420       Address ISPEXEC 'SETMSG MSG(APCT017I)'                  
     000006       509                'SETMSG MSG('MSGB')'                           
     000007       515                'SETMSG MSG('MSGB')'                           
     000008       637    'SETMSG MSG(APCT004F)'    /* already allocated */          
     000009       642    'SETMSG MSG(APCT004C)'                                     
     000010       990    'SETMSG MSG(APCT001L)'                                     
     000011      1237    'SETMSG MSG(APCT001L)'                                     
     000012      2137  Address ISPEXEC "SETMSG MSG(FMNBE002)";                      
     000013      2715  address ispexec 'SETMSG MSG(APCT009I)'                       
     000014      3476      address ISPEXEC 'SETMSG MSG(APCT022I)'    /* copy failed 
     000015      3482      address ISPEXEC 'SETMSG MSG(APCT021I)'                   
     000016  >Member : APCT2AZB                                                     
     000017       278      'SETMSG MSG(APCT017I)'    /* no information available */ 
     000018       343       Address ISPEXEC 'SETMSG MSG(APCT017I)'                  
     000019       428                'SETMSG MSG('MSGB')'                           
    
  10. Position the cursor to line 9 in the data area and press Enter to navigate to line 642 of the member.
       File  Edit  Edit_Settings  Menu  Utilities  Compilers  Test  Help            
     ───────────────────────────────────────────────────────────────────────────────
     VIEW       FMN.DEMO01.EXEC(APCTRTC)                        Columns 00001 00072 
     Command ===>                                                  Scroll ===> CSR  
     000642   'SETMSG MSG(APCT004C)'                                                
     000643   exit                                                                  
     000644 end                                                                     
     000645                                                                         
     000646                                                                         
     000647 call Use_Qbaselib                                                       
     000648 return                                                                  
     000649 /*********************************************************************/ 
     000650 /* Allocate the data sets from the user upwards                      */ 
     000651 /*********************************************************************/ 
     000652 Use_Qbaselib:                                                           
     000653 Address ISPEXEC                                                         
     000654 'QBASELIB 'XLIBS' ID('liblist')'                                        
     000655                                                                         
     000656 liblist = translate(liblist,' ',',')                                    
     000657                                                                         
     000658 do i = 1 to words(liblist)                                              
     000659   libname = word(liblist,i)                                             
     000660   parse var libname . '.' grp.i '.' .                                   
     000661 end                                                                     
    
  11. Position the cursor to on the word "APCT004C" and press Enter to produce a nested indexed search report.
       File  Edit  Edit_Settings  Menu  Utilities  Compilers  Test  Help            
     ───────────────────────────────────────────────────────────────────────────────
     VIEW        Indexed Search Report      Index DEMO1             Col 00001 00072 
     Command ===>                                                  Scroll ===> CSR  
     ****** ***************************** Top of Data ******************************
     000001 ------------------------------------------------------------------------
     000002 >Data Set: FMN.DEMO01.MSGS                                              
     000003  >Member : APCT00                                                       
     000004       241  APCT004C 'Release mismatch' .ALARM=YES  .WINDOW=NORESP       
     000005 ------------------------------------------------------------------------
     000006 >Data Set: FMN.DEMO01.EXEC                                              
     000007  >Member : APCTRTC                                                      
     000008       642    'SETMSG MSG(APCT004C)'                                     
     000009  >Member : APCT2AZB                                                     
     000010       561    'SETMSG MSG(APCT004C)'                                     
     000011  >Member : APCT2AZO                                                     
     000012       565    'SETMSG MSG(APCT004C)'                                     
     000013  >Member : APCT2AZP                                                     
     000014       523    'SETMSG MSG(APCT004C)'                                     
     000015  >Member : BCK2AZ                                                       
     000016       647    'SETMSG MSG(APCT004C)'                                     
     000017  >Member : BPCT2AZ                                                      
     000018       566    'SETMSG MSG(APCT004C)'                                     
     000019  >Member : FMPROM