Ü  KLIST (Define a Composite Key)

·         It is used to create a composite key consisting of many key fields that is used as an argument for performing operation on a file.

·         KLIST is used for file operations CHAIN, DELETE, READE, READPE, SETGT, or SETLL.

·         To define fields of a keylist we use KFLD opcode.

 

 

Example

 


Columns . . . :    6 100                                      Browse        
 SEU==>                                                                      
 FMT FX FFilename++IPEASF.....L.....A.Device+.Keywords++++++++++++++++++++++++
        *************** Beginning of data ************************************
0001.00 FACCOUNT   UF A E           K DISK                                   
0002.00  *                                                                    
0003.00 C     KLST1         KLIST                                            
0004.00 C                   KFLD                    ORG                      
0005.00 C                   KFLD                    ACC                       
0006.00 C                   EVAL      ORG=192                                
0007.00 C                   EVAL      ACC='A00000000017'                     
0008.00 C     KLST1         SETLL     ACCOUNT                                
0009.00 C                   IF        %EQUAL(ACCOUNT)                        
0010.00 C                   READ      ACCOUNT                                
0011.00 C                   EVAL      CCY='AZK'                              
0012.00 C                   EXCEPT    UPDATE_R                               
0013.00 C                   ENDIF                                            
0014.00 C                   SETON                                        LR  
0015.00  *                                                                    
0016.00 OREC1      E            UPDATE_R                                     
0017.00 O                       CCY                                          
        ****************** End of data ***************************************











User Comments:



Subscribe

.  


Copyright © www.go4as400.com, 2013-2023. Copyright notice   Terms of services   Privacy policy