Problem in writing footer in windows subfile

515 pts.
Tags:
AS/400 Subfiles
RPG IV
Subfile
hi if i write footer its not getting displayed... write control write footer exfmt control.. i hv coded lik above pls rep as soon as possible

Software/Hardware used:
As400

Answer Wiki

Thanks. We'll let you know when a new response is added.

In DDS set OVERLAY on Footer format.

Discuss This Question: 9  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • 22917
    Hi Samule I have already Given Overlay in footer.Is there anything else to be addded.. I have given overlay in wdw sfl ctrl rec fmt also Pls rep as soon as possible.... thanks in advance...
    515 pointsBadges:
    report
  • MDratwa
    I think that you do not need the OVERLAY in the footer, just in the subcntl. You write the footer first to clear the screen and then write the subcntl (with OVERLAY). Just make sure that the subfile does not run into the footer line. I always allow 1 line between subfile and screen (footer).
    785 pointsBadges:
    report
  • Splat
    write control write footer exfmt control.. What happens after the first write control and before the write footer? Is that first write being used to clear/initialise the subfile?
    7,635 pointsBadges:
    report
  • TomLiotta
    It could be most useful if you could post the DDS for header, footer and subfile. Tom
    125,585 pointsBadges:
    report
  • 22917
    My windows subfile and footer
     
     A          R RMA01S1                   SFL                      
     
     A  40                                  SFLNXTCHG                
     A            ZOPT           1A  B  6  2                         
     A            ZITMNO        15A  O  6  7                         
     A            ZITMDS        30A  O  6 24 
                            
     A          R RMA01C1                   SFLCTL(RMA01S1)       
     A                                      CA03(03 'EXIT')          
     A                                      CA12(12 'CANCEL')    
     A                                      OVERLAY             
     A  30                                  SFLDSP              
     A  31                                  SFLDSPCTL           
     A  32                                  SFLCLR              
     A  33                                  SFLEND              
     A                                      SFLSIZ(0010)        
     A                                      SFLPAG(0005)        
     A  99                                  SFLMSG('error' 99)  
     A                                      WINDOW(5 11 15 60)  
    A                                  1 17'Item Search Screen'        
    A                                      COLOR(WHT)                  
    A                                  3  2'                           
    A                                                    '             
    A                                      DSPATR(UL)                  
    A                                  5  2'Opt'                       
    A                                      COLOR(WHT)                  
    A                                  5  7'ItemNo'                    
    A                                      COLOR(WHT)             
    A                                  5 24'ItemDesc'             
    A                                      COLOR(WHT)             
    A          R RFOOTER                                          
    A*%%TS  SD  20110419  181831  GOVINDASAS  REL-V5R2M0  5722-WDS
    A                                      CA03(03 'Exit')        
    A                                      CA12(12 'Cancel')      
    A                                      OVERLAY                
    A                                      WINDOW(5 11 15 60)     
    A                                 12  2'                          
    A                                                             '   
    A                                      DSPATR(UL)                 
    A                                 13  8'F3=Exit'                  
    A                                      COLOR(BLU)                 
    A                                 13 47'F12=Cancel'               
    A                                      COLOR(BLU)                     
    
    
    515 pointsBadges:
    report
  • 22917
    
    My RPG program,I have shown only the code handling this windows sfl(Prompt) and footer
    
    C                   If        *In04=*On                             
    C                             OR ZFLD = ITMNUM                      
    C                   Eval      ZOPT = ' '                            
    C                   ExSr      WDWSUB                                
    C                   EndIf                                           
    C                   EndSr                                           
     **---------------------------------------------------------------- 
     **Window Subfile-Retrieving Item Number & Description              
     **---------------------------------------------------------------- 
    C     WDWSUB        BegSr                                           
    C                   ExSr      SFLCLR                                
    C                   ExSr      SFLLOD                                
    C                   ExSr      SFLSHW                                
    C                   Dow       *In03=*Off                            
    C                   Write     RMA01C1          <--   
    C                   Write     RFOOTER         <--   
    C                   Exfmt     RMA01C1           <--  
    C                   If        *In12 = *On         
    C                   Leave                         
    C                   EndIf                         
    C                   ExSr      SFLVAL              
    C                   EndDo                         
    C                   Eval      *In03 = *Off        
    C                   EndSr                           
     **-------------------------------------------------
     **Window Subfile-SFL CLEAR                         
     **-------------------------------------------------
    C     SFLCLR        BegSr                           
    C                   Eval      *In32 = *On           
    C                   Write     RMA01C1               
    C                   Eval      *In32 = *Off          
    C                   Eval      rrn1= 0               
    C                   EndSr                        
     **----------------------------------------------
     **Window Subfile-SFL Load                       
     **----------------------------------------------
    C     SFLLOD        BegSr                        
    C     *Loval        SetLL     ITEMAS             
    C                   Read      ITEMAS             
    C*                  Dow       Not %Eof(ITEMAS)   
    C                   Dow       rrn1 < 9999        
    C                   Eval      rrn1+= 1      
    C                   Eval      Zitmno = ITNBR
    C                   Eval      Zitmds = ITDSC
    C                   Write     RMA01S1       
    C                   Read      ITEMAS        
    C                   EndDo                   
    C                   EndSr                   
     **-----------------------------------------
     **Window Subfile-SFL Show                  
      **---------------------------------------------
     C     SFLSHW        BegSr                       
     C                   Eval      *In31 = *On       
     C                   If        rrn1 > 0          
     C                   Eval      *In30 = *On       
     C                   Else                        
     C                   Eval      *In30 = *Off      
     C                   EndIf                       
     C                   EndSr                       
                                                     
     **----------------------------------------------------------------     
     **Window Subfile-SFL Validation                                        
     **----------------------------------------------------------------     
    C     SFLVAL        BegSr                                               
    C                   ReadC     RMA01S1                                40 
    C                   Dow       Not %Eof                                  
    C                   Select                                              
    C                   When      ZOPT = '1'                                
    C                   Eval      ITMNUM = ZITMNO                           
    C                   Eval      ITMDSC = ZITMDS                           
    C                   Other                                               
    C                   Eval      *In99 = *On                               
    C                   EndSl                                               
    C                   ReadC     RMA01S1                                40 
    C                   EndDo                                               
    C                   EndSr                 
    
    515 pointsBadges:
    report
  • TomLiotta
    This is the first thing that I would change:
    A          R RFOOTER
    A*%%TS  SD  20110419  181831  GOVINDASAS  REL-V5R2M0  5722-WDS
    A                                      CA03(03 ‘Exit’)
    A                                      CA12(12 ‘Cancel’)
    A                                      OVERLAY
    A                                      WINDOW(5 11 15 60)
    The last line should be:
    A                                      WINDOW(RMA01C1)
    By making that change, you are telling the system that the footer belongs to the window from the RMA01C1 record format. If you don't do that, the system is going to create a separate window. Your control will be in one window and your footer in a different window. Both windows are in the same positions on the screen -- only one can be visible at a time. However, I would actually do this in a different way anyway. I would reverse it. I would make the footer format be the window format and I'd have the control format reference the footer window. In the program, I would write the footer format first -- that applies the window to the screen. Then I would write the control format so that it becomes active in the current window. Does the WINDOW(<format>) make sense? It's discussed in the DDS manual as the "second format for the WINDOW keyword", almost half-way through the WINDOW topic. It can be easy to miss. Tom
    125,585 pointsBadges:
    report
  • Splat
    I would also suggest getting rid of the
    C                   Write     RMA01C1          <–
    It serves no purpose.
    7,635 pointsBadges:
    report
  • 22917
    [...] Problem in writing footer in Windows subfile [...]
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following