Ü  SFLROLVAL

 

·         This keyword is used to specify the page roll value at the event of PAGEUP and PAGEDOWN.

·         We put a field at the display screen which is used to specify the scroll amount for PAGEUP and PAGEDOWN activity.

·         Just after entering the roll value, we press PAGEUP or PAGEDOWN to see the result.

 

 

Example

 

 


Columns . . . :    1  80               Browse                       AMITCCCCC/QRPGLESRC
SEU==>                                                                       LOAD_DSPC2
FMT DP .....AAN01N02N03T.Name++++++RLen++TDpBLinPosFunctions+++++++++++++++++++++++++++
*************** Beginning of data *****************************************************
0001.00      A                                      DSPSIZ(24 80 *DS3)
0002.00      A                                      CA03(03 'EXIT')
0003.00      A          R HEADER
0004.00      A                                      OVERLAY
0005.00      A                                  1  3USER
0006.00      A                                      DSPATR(HI)
0007.00      A                                      COLOR(BLU)
0008.00      A                                  1 71DATE
0009.00      A                                      EDTCDE(Y)
0010.00      A                                      DSPATR(HI)
0011.00      A                                      COLOR(BLU)
0012.00      A                                  2 71TIME
0013.00      A                                      DSPATR(HI)
0014.00      A                                      COLOR(BLU)
0015.00      A                                  1 23'DISPLAY THE LOADALL SUBFILE'
0016.00      A                                      DSPATR(HI)
0017.00      A                                      COLOR(BLU)
0018.00      A          R FOOTER
0019.00      A                                      OVERLAY
0020.00      A                                 23  7'F3'
0021.00      A                                      DSPATR(RI)
0022.00      A                                      COLOR(WHT)
0023.00      A                                 23 10'= EXIT'
0024.00      A                                 23 26'F12'
0025.00      A                                      DSPATR(HI)
0026.00      A                                      DSPATR(RI)
0027.00      A                                 23 30'=PREVIOUS'
0028.00      A          R EXPD_SFL                  SFL
0029.00      A  56                                  SFLNXTCHG
0030.00      A            S_ORG          3S 0O  8 12
0031.00      A            S_ACC         12A  O  8 28
0032.00      A            S_CCY          3A  O  8 49
0033.00      A          R EXPD_CTL                  SFLCTL(EXPD_SFL)
0034.00      A                                      OVERLAY
0035.00      A  52                                  SFLDSP
0036.00      A  51                                  SFLDSPCTL
0037.00      A  50                                  SFLCLR
0038.00      A  45                                  SFLEND(*MORE)
0039.00      A                                      SFLSIZ(0006)
0040.00      A                                      SFLPAG(0005)
0041.00      A            S_ROLVAL       4S 0B 03 15SFLROLVAL
0042.00      A            S_RECNO        4S 0H      SFLRCDNBR
0043.00      A                                  3  3'ROLL VALUE:'
0044.00      A                                  6 12'ORG CODE'
0045.00      A                                  6 27'ACCOUNT NUMBER'
0046.00      A                                  6 48'CURRENCY'
****************** End of data ***************************************************

 



Columns . . . :    6  80                       Browse              AMITCCCCC/QRPGLESRC
SEU==>                                                                      LOAD_RPGC2
FMT *   *. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8
*************** Beginning of data ****************************************************
0001.00                                                                                
0002.00 HDEBUG(*YES)                                                                    
0003.00 HOPTION(*NODEBUGIO)                                                            
0004.00  *                                                                             
0005.00 FMASTER    IF   E           K DISK                                             
0006.00 FLOAD_DSPC2CF   E             WORKSTN                                          
0007.00 F                                     SFILE(EXPD_SFL:RRN)                       
0008.00 F                                     INFDS(infds)                             
0009.00  *                                                                             
0010.00 Dinfds            DS                                                            
0011.00 DRECNO                  378    379I 0                                          
0012.00  *____________________________________________________________________         
0013.00  *______ In load all subfile after PAGE DOWN if we press ENTER, then           
0014.00  *______ first PAGE will be displayed, to avoid this we pass min RRN           
0015.00  *______ value of current page( using INFDS) to SFLRECNBR variable.            
0016.00  *____________________________________________________________________         
0017.00 C     *IN03         DOWEQ     *OFF                                             
0018.00 C                   EXSR      MAIN                                              
0019.00 C                   EXSR      DSPSFL                                           
0020.00 C                   ENDDO                                                      
0021.00 C                   SETON                                            LR        
0022.00 C*                                                                             
0023.00 C*_____________________________________________                                
0024.00 C*____________MAIN SUBROUTINE BEGINS HERE______                                
0025.00 C*_____________________________________________                                
0026.00 C     MAIN          BEGSR                                                       
0027.00 C* _ _ _ PAGE UP / PAGE DOWN HANDLING NOT NEEDED_ _                            
0028.00 C                   ENDSR                                                      
0029.00 C*_________________________________________________                            
0030.00 C*_________________________________________________                            
0031.00 C*_______________CLEAR SUBFILE_____________________                            
0032.00 C*_________________________________________________                            
0033.00 C     CLRSFL        BEGSR                                                      
0034.00 C                   EVAL      RRN=0                                             
0035.00 C                   SETON                                        50            
0036.00 C                   WRITE     EXPD_CTL                                         
0037.00 C                   SETOFF                                       50            
0038.00 C                   ENDSR                                                      
0039.00 C*_________________________________________________                            
0040.00 C*_______________FIRST FUBROUTINE__________________                            
0041.00 C*_________________________________________________                            
0042.00 C*                                                                              
0043.00 C     *INZSR        BEGSR                                                      
0044.00 C                   SETOFF                                       505152        
0045.00 C                   SETOFF                                       45            
0046.00 C                   Z-ADD     *ZEROS        RRN               4 0              
0047.00 C                   EVAL      S_RECNO=1                                        
0048.00 C                   EXSR      CLRSFL                                           
0049.00 C                   EXSR      FILSFL                                           
0050.00 C                   EXSR      DSPSFL                                           
0051.00 C                   ENDSR                                                      
0052.00 C*_________________________________________________                            
0053.00 C*_______________FILL SUBFILE__________________                                 
0054.00 C*_________________________________________________                            
0055.00 C*                                                                             
0056.00 C     FILSFL        BEGSR                                                      
0057.00 C                   SETOFF                                       45            
0058.00 C                   DOU       %EOF(MASTER)                                     
0059.00 C                   READ(N)   REC1                                             
0060.00 C                   IF        %EOF(MASTER)                                     
0061.00 C                   EVAL      *IN45=%EOF(MASTER)                                
0062.00 C                   LEAVESR                                                    
0063.00 C                   ENDIF                                                      
0064.00 C                   EVAL      S_ORG=ORG                                        
0065.00 C                   EVAL      S_ACC=ACC                                        
0066.00 C                   EVAL      S_CCY=CCY                                        
0067.00 C                   ADD       1             RRN                                
0068.00  *- - Don't write to subfile buffer if RRN>9999                                
0069.00 C                   IF        RRN>9999                                          
0070.00 C                   LEAVE                                                      
0071.00 C                   ENDIF                                                      
0072.00 C                   WRITE     EXPD_SFL                                         
0073.00 C                   ENDDO                                                      
0074.00 C                   ENDSR                                                      
0075.00 C*_________________________________________________                            
0076.00 C*                                                                             
0077.00 C     DSPSFL        BEGSR                                                       
0078.00 C                   SETON                                        5152          
0079.00  * - - - Handle session device error if RRN<=0 i.e. no data in the buffer      
0080.00 C                   IF        RRN<=0                                            
0081.00 C                   SETOFF                                       52            
0082.00 C                   ENDIF                                                      
0083.00  *                                                                              
0084.00 C                   WRITE     HEADER                                           
0085.00 C                   WRITE     FOOTER                                           
0086.00 C                   EXFMT     EXPD_CTL                                         
0087.00 C                   EVAL      S_RECNO=RECNO                                    
0088.00 C                   SETOFF                                       5152          
0089.00 C                   ENDSR                                                      
****************** End of data *******************************************************

 

 


OUTPUT

 

 

Below is the screen that will be displayed the very first time.

 

 


  AMIT                DISPLAY THE LOADALL SUBFILE                     12/04/13 
                                                                      12:26:16 
  ROLL VALUE: ____                                                      
                                                                               
                                                                               
           ORG CODE       ACCOUNT NUMBER       CURRENCY                        
                                                                               
           190             A00000000001         EUR                            
           190             A00000000002         USD                            
           190             A00000000004         EUR                            
           190             A00000000005         USD                            
           191             A00000000006         USD                            
                                                                        More...
                                                    
                                                                                
                                                                               
      F3 = EXIT          F12 =PREVIOUS                                    

 

 

 

Now we make an entry in the ROLL VALUE field as ROLL VALUE=2.

 

 


  AMIT                DISPLAY THE LOADALL SUBFILE                     12/04/13 
                                                                      12:26:16 
  ROLL VALUE:    2                           
                                                                               
                                                                               
           ORG CODE       ACCOUNT NUMBER       CURRENCY                        
                                                                                
           190             A00000000001         EUR                            
           190             A00000000002         USD                            
           190             A00000000004         EUR                            
           190             A00000000005         USD                            
           191             A00000000006         USD                            
                                                                        More...
                                               
                                                                               
      F3 = EXIT          F12 =PREVIOUS            




 

We press PAGE DOWN after entering the ROLL VALUE as 2 and get the below screen starting from 3rd record.

 

 

 


  AMIT                DISPLAY THE LOADALL SUBFILE                     12/04/13 
                                                                      12:26:16 
  ROLL VALUE:      2         
                                                                               
                                                                               
           ORG CODE       ACCOUNT NUMBER       CURRENCY                        
                                                                               
           190             A00000000004         EUR                            
           190             A00000000005         USD                            
           191             A00000000006         USD                            
           191             A00000000007         EUR                            
           191             A00000000008         USD                             
                                                                        More...
                                                      
                                                                               
      F3 = EXIT          F12 =PREVIOUS                                     

 

                   

 

Now we enter the ROLL VALUE as 5 as shown below:

                    

 


  AMIT                DISPLAY THE LOADALL SUBFILE                     12/04/13 
                                                                      12:26:16 
  ROLL VALUE:      5                      
                                                                               
                                                                                
           ORG CODE       ACCOUNT NUMBER       CURRENCY                        
                                                                               
           190             A00000000004         EUR                            
           190             A00000000005         USD                            
           191             A00000000006         USD                            
           191             A00000000007         EUR                            
           191             A00000000008         USD                            
                                                                        More...
                                                                                
                                          
                                                                               
      F3 = EXIT          F12 =PREVIOUS                                         

 

 

We press PAGE DOWN after entering the ROLL VALUE as 5 and get the below screen starting from 8th record.

 

 

 


  AMIT                DISPLAY THE LOADALL SUBFILE                     12/04/13 
                                                                      12:26:16 
  ROLL VALUE:      5          
                                                                               
                                                                                
           ORG CODE       ACCOUNT NUMBER       CURRENCY                        
                                                                               
           192             A00000000009         TRY                            
           192             A00000000010         INR                            
           192             A00000000011         INR                            
           192             A00000000012         INR                            
                                                                               
                                                                         Bottom

                                                                               
      F3 = EXIT          F12 =PREVIOUS                      

 

 

 

Now we enter the ROLL VALUE as 6 as shown below:

 


  AMIT                DISPLAY THE LOADALL SUBFILE                     12/04/13 
                                                                      12:26:16 
  ROLL VALUE:      6                 
                                                                               
                                                                                
           ORG CODE       ACCOUNT NUMBER       CURRENCY                        
                                                                               
           192             A00000000009         TRY                            
           192             A00000000010         INR                            
           192             A00000000011         INR                            
           192             A00000000012         INR                            
                                                                               
                                                                         Bottom

                                                                                
      F3 = EXIT          F12 =PREVIOUS                                         

 

 

 

We press PAGE UP after entering the ROLL VALUE as 6 and get the below screen starting from 2nd record.

 

 


  AMIT                DISPLAY THE LOADALL SUBFILE                     12/04/13 
                                                                      12:26:16 
  ROLL VALUE:      6               
                                                                               
                                                                               
           ORG CODE       ACCOUNT NUMBER       CURRENCY                        
                                                                               
           190             A00000000002         USD                            
           190             A00000000004         EUR                            
           190             A00000000005         USD                            
           191             A00000000006         USD                            
           191             A00000000007         EUR                            
                                                                        More...
                                                                               
                                                             
      F3 = EXIT          F12 =PREVIOUS              


 

 

 

Now we enter ROLL VALUE as 30 and press PAGE DOWN. It takes us to the last page and again if we press PAGE DOWN it will show the error “Roll up or down past the first or last record in file”.

 

 
  AMIT                DISPLAY THE LOADALL SUBFILE                     12/04/13 
                                                                      12:29:24 
  ROLL VALUE:    30           
                                                                               
                                                                               
           ORG CODE       ACCOUNT NUMBER       CURRENCY                        
                                                                               
           191             A00000000008         USD                            
           192             A00000000009         TRY                            
           192             A00000000010         INR                            
           192             A00000000011         INR                            
           192             A00000000012         INR                            
                                                                         Bottom

                                                                                
      F3 = EXIT          F12 =PREVIOUS                                         
 Roll up or down past the first or last record in file.             





 

 







User Comments:



Subscribe

.  


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