510 pts.
 Problem in writing footer in windows 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
ASKED: April 19, 2011  11:10 AM
UPDATED: April 27, 2011  2:42 PM

Answer Wiki:
In DDS set OVERLAY on Footer format.
Last Wiki Answer Submitted:  April 20, 2011  7:52 am  by  Samule400   160 pts.
All Answer Wiki Contributors:  Samule400   160 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

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…

 510 pts.

 

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).

 645 pts.

 

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?

 5,670 pts.

 

It could be most useful if you could post the DDS for header, footer and subfile.

Tom

 108,280 pts.

 

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)                     

 510 pts.

 

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                 
 510 pts.

 

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

 108,280 pts.

 

I would also suggest getting rid of the

C                   Write     RMA01C1          <–

It serves no purpose.

 5,670 pts.