Sub-file programming - loading a page at a time

This is the DDS for the Display File



A                                      REF(*LIBL/CUS)           
A                                      PRINT                    
A                                      CA03(03)                 
 *--------------------------------------------------------------
A          R ENTSLS                                             
 *                                                              
 * LET USER ENTER A SALESPERSON # SO PROGRAM CAN SHOW A LIST    
 * OF CUSTOMERS                                                 
A                               O  2 20'LIST CUSTOMERS FOR SLS#'
A            CUSSLS    R        B  2 46EDTCDE(4)                
 *--------------------------------------------------------------
A          R SFDATA                    SFL                      
A            SEL            1A  I  4  2                         
A            CUSNUM    R        O  4  5                         
A            CUSNAM    R        O  4 15                         
A            CUSPHN    R        O  4 50                         
 *------------------------------------------------------
A          R SFCTL                     SFLCTL(SFDATA)      
A                                      SFLPAG(0005)        
A                                      SFLSIZ(0006)        
A                                      OVERLAY             
A N50                                  SFLCLR              
A  50                                  SFLDSP              
A  50                                  SFLDSPCTL           
 * ------------------------------------------------------  
 * next 3 lines needed for 1 page at a time logic          
 * (also make SFLSIZ 1 bigger than SFLPAG - see above)     
A  95                                  SFLEND(*MORE)       
A                                      ROLLUP(21)          
A            SFLRCD         4S 0H      SFLRCDNBR(CURSOR)   
 * ------------------------------------------------------  
A                                  2  4'SALESPERSON#'      
A            CUSSLS    R        O  2 17EDTCDE(4)           
A                                  3  1'SEL'                    
A                                  3  5'CUST'                   
A                                  3 15'NAME'                   
A                                  3 50'PHONE#'                 
 *--------------------------------------------------------------
A          R CMDKEYS                                            
A                                 24 40'F3=EXIT'                
 *--------------------------------------------------------------

Back to Source Code Page   |   Basic 400 Skills   |   Main Page