25 pts.
 AS400 Windows using overlay
I have a problem with OVERLAY. I have a screen where a user enters a '?' on a particular field, a window will pop up. After selecting a value press enter and it comes back to the original display with the selected value displayed on field.Everything is working fine but parts of window is still shown on display. Can anybody suggest me a solution. I am ending the window program with a SETON LR.

Software/Hardware used:
ASKED: February 7, 2012  7:14 AM
UPDATED: March 17, 2012  1:46 AM

Answer Wiki:
Hi Sindia, You might have Switched ON OVERLAY indicator in your Screen. As, You are using another Record format for Window, You will not need OVERLAY indicator for displaying Window when '?' has taken from your initial Screen. OVERLAY indicator is needed only when you will need to display and aceess the Screen & Window at a time. If you need the OVERLAY indicator in your screen for any other purpose, try switching it OFF when you are displaying WINDOW. Reply back, If it doesnt work. Pradeep.
Last Wiki Answer Submitted:  February 7, 2012  8:13 am  by  deepu9321   3,520 pts.
All Answer Wiki Contributors:  deepu9321   3,520 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


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


 

Pradeep,

Thank You for the reply.
OVERLAY is required in the screen because I am displaying the function keys and error messages in a different record format.

 25 pts.

 

Yeah, I had that point in my mind. That is the reason I had suggested to Switch OFF the indicator while calling the WINDOW program.

Have you tried by Switching OFF the OVERLAY Indicator at the time of Writing WINDOW.

Pradeep.

 3,520 pts.

 

I tried by switching off the indicator while calling the window program and again turned in ON while writing my display screen. But couldnt succeed.
The same window is working fine when called from another program. So I am not supposed to change anything in window program.

 25 pts.

 

This might help http://www2.systeminetwork.com/resources/clubtech/TNT400/bo400ng/AS400Q0102.htm

It’s adding a dummy record in your primary dds with the ASSUME keyword.
Phil

 44,630 pts.

 

Try compiling your screen with the following:

Enhanced display . . . . . . . . *YES *YES, *NO
Restore display . . . . . . . . . *YES *NO, *YES

Also, here is a small program I use to verify that a user truly wants to delete a record. Use it as a test on your system to see if you get the same results.

Here is the DDS

 A                                      DSPSIZ(24 80 *DS3)                      
 A                                      PRINT                                   
 A                                      INDARA                                  
 A                                      CF12(12 'CANCEL DELETE')                
 A          R WS1                                                               
 A                                      OVERLAY                                 
 A                                      WINDOW(10 14 7 50)                      
 A                                      WDWBORDER((*COLOR BLU) (*DSPATR RI)-    
 A                                       (*CHAR '        '))                    
 A                                  2  4'ARE YOU SURE YOU WANT TO DELETE TH-    
 A                                      IS RECORD?'                             
 A                                      DSPATR(HI)                              
 A                                      COLOR(RED)                              
 A            SCRYESNO       1A  B  3 26DSPATR(HI)                              
 A                                  4 25'Y/N'                                   
 A                                      DSPATR(HI)                              
 A                                      COLOR(RED)                              
 A                                  6 17'F12 = CANCEL DELETE'                   
 A                                      COLOR(BLU)                              
 A          R ASSUME                                                            
 A                                      ASSUME                                  
 A                                      OVERLAY                                 
 A                                  2  2' '                                     
 A                                      DSPATR(ND) 

Here is the RPG.

 ********************************************************************** 
 *  SET COMPILER OPTIONS                                                
 ********************************************************************** 
HNOMAIN                                                                 
HOPTION(*NODEBUGIO:*SRCSTMT)                                            
 ********************************************************************** 
 *  PROGRAM NAME: AREYOUSURE                                            
 *  CREATION DATE: 08/12/08                                             
 *  PURPOSE OF PROGRAM: DISPLAY RECORD DELETE VALIDATION SCREEN.        
 ********************************************************************** 
 * FILES USED BY PROGRAM.                                               
 ********************************************************************** 
FAREUSUREFMCF   E             WORKSTN USROPN                            
F                                     INFDS(WSINFDS)                    
 ********************************************************************** 
 *  KEY PRESS DATA STRUCTURE.                                           
 ********************************************************************** 
D WSINFDS         DS                                                    
D  CMD_KEY              369    369A                                     
 ********************************************************************** 
 * PROTOTYPE FOR PROCEDURE                                              
 *********************************************************************  
D  AREYOUSURE     PR             1                                      
 *********************************************************************  
 * START PROCEDURE DEFINITION                                           
 *********************************************************************  
P  AREYOUSURE     B                   EXPORT                            
D  AREYOUSURE     PI             1                                      
 ********************************************************************** 
 *  COMMAND KEY DEFINITIONS.                                            
 ********************************************************************** 
D  CANCEL_DELETE  C                   Const(x'3C')                      
 *********************************************************************  
 * FIELD DEFINITIONS                                                    
 *********************************************************************  
                                                                        
                                                                        
                                                                        
                                                                        
  // ****************************************************************** 
  // * START FREE FORM CALCS.                                           
  // ****************************************************************** 
                                                                        
 /FREE                                                                  
                                                                        
  // ****************************************************************** 
  // * SET SCREEN DEFAULTS.                                             
  // * OPEN VERIFICATION WINDOW.                                        
  // ****************************************************************** 
                                                                        
    SCRYESNO = 'N';                                                     
                                                                        
    OPEN AREUSUREFM;                                                    
                                                                        
    EXFMT WS1;                                                          
                                                                        
    IF CMD_KEY = CANCEL_DELETE;                                         
                                                                        
      SCRYESNO = 'N';                                                   
                                                                        
    ENDIF;                                                              
                                                                        
    CLOSE AREUSUREFM;                                                   
                                                                        
  // ****************************************************************** 
  // * RETURN SCREEN VALUE TO CALLING PROGRAM.                          
  // ****************************************************************** 
                                                                        
    *INLR = *ON;                                                        
    RETURN SCRYESNO;                                                    
                                                                        
 /END-FREE                                                              
                                                                        
P  AREYOUSURE     E                                                     

 5,860 pts.