ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Blanking out the background screen when a window is displayed second time

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Blanking out the background screen when a window is displayed second time

    Hi,

    There have been a number questions regarding clering the background screen when displaying the new window. I believe that situation we have is a bit different.

    We have a program that consists of a few modules and in certain situations it calls other programs.
    User enters information (and presses certain key to initiate action). At this time program validates different things and it makes calls to some other programs as well.
    There are cases when user request need to be approved in which case approval window (called from another program) is displayed.
    It may also happen that we need more that one approval in the same request and user have to approve these discrepances separatelly, so approval window appears more then once.

    All dspfs have dummy records. When "approval window" is displayed for the fist time background screen stays. Problem that we have happens on additional display of the "approval window". Second appearance clears the background.

    Program logic:
    Master/initial screen (where user enters info) is in one module
    Validation for user request is in another module.

    Initial screen --> user enteres request --> validation (new module) -->if error - call to outside program that displayes approval window (background screen is visible)

    User approves --> back to validation module to continue editing -- if another error - call to outside program to display approval window (background screen is blanked)

    Has anybody idea how could this be solved?
    Thanks

  • #2
    Re: Blanking out the background screen when a window is displayed second time

    can you strip down the code & dds to post so we may play with it?
    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

    Comment


    • #3
      Re: Blanking out the background screen when a window is displayed second time

      This approval window; are all these instances when multiple windows are displayed all the same DSPF? You sure there's not one rogue instance?
      Regards

      Kit
      http://www.ecofitonline.com
      DeskfIT - ChangefIT - XrefIT
      ___________________________________
      There are only 3 kinds of people -
      Those that can count and those that can't.

      Comment


      • #4
        Re: Blanking out the background screen when a window is displayed second time

        Not sure but try to change or recreate the background display files getting blanks using RSTDSP(*YES).

        Help Restore display (RSTDSP) - Help
        Specifies whether data being shown at a display device by this
        display file is saved at the time the file is suspended (made
        temporarily inactive) so that a different display file can be used
        to show different data on the same device. If the data for this
        file is saved, it is restored to the display of the device when the
        file is used again.
        Last edited by Mercury; December 15, 2009, 02:43 AM.
        Philippe

        Comment


        • #5
          Re: Blanking out the background screen when a window is displayed second time

          RSTDSP is already *YES

          I have uploaded attachment that displays the screens.

          There are multiple programs and multiple DSPFs involved.
          1. Binded program:
          first module (with DSPF) - displays main screen
          second module (no DSPF) - called to perform editing
          2. call to program A (no DSPF) in case of need for approval
          3. call from program A to program B (with DSPF) to
          display "approval window"
          4. back to module 2 to continue editing, if neede another
          approval call to program C (with DSPF) to display the "approval
          window"

          Note that there are two different programs/screens for approval window

          Comment


          • #6
            Re: Blanking out the background screen when a window is displayed second time

            Hi OliveraM:

            Just a shot in the dark here.....Does the disappearing screen have a conditional indicator on a clrl key word?


            GLS
            Last edited by GLS400; December 15, 2009, 09:45 AM.
            The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

            Comment


            • #7
              Re: Blanking out the background screen when a window is displayed second time

              Here is DSPF for the first approval window
              Code:
              A*%%EC                                                                        
              A                                      DSPSIZ(24 80 *DS3                  -   
              A                                             27 132 *DS4)                    
              A                                      PRINT                                  
              A                                      HLPTITLE(' ')                          
              A                                      HLPPNLGRP(MAIN MSHSCOVR)               
              A                                      HELP                                   
              A          R WIWXXX                                                           
              A                                      ASSUME                                 
              A                                      KEEP                                   
              A                                      OVERLAY                                
              A            DUMMYFLD       1A    24 79                                       
              A*                                 1  3' '                                    
              A*                                                                            
              A          R MSFRCD01                                                         
              A*%%TS  SD  20040818  161718  SETHEPALLI  REL-V5R2M0  5722-WDS                
              A                                      WINDOW(*DFT 10 43)                     
              A                                      CF06                                   
              A                                      WDWBORDER((*DSPATR RI) (*CHAR '    -   
              A                                          '))                                
               A                                      USRRSTDSP                      
               A                                      OVERLAY                        
               A                                      PUTOVR                         
               A                                      OVRDTA                         
               A          H                           HLPPNLGRP(USER MSHSCOVR)       
               A                                      HLPARA(*FLD USER#D)            
               A          H                           HLPPNLGRP(PAWD MSHSCOVR)       
               A                                      HLPARA(*FLD PAWD#D)            
               A            HDNGS1        23A  O  1 10MSGID(AAA 5691 SSMSGDF)        
               A                                      DSPATR(RI)                     
               A            LABLD#        40A  O  2  2DSPATR(HI)                     
               A            APRLBL        13A  O  4  1DSPATR(HI)                     
               A                                      MSGID(AAA 4664 SSMSGDF)        
               A            USER#D        10A  B  4 15                               
               A  32                                  DSPATR(RI)                     
               A                                      DSPATR(PC)                     
               A            PWDLBL        13A  O  5  1DSPATR(HI)                     
               A                                      MSGID(AAA 4695 SSMSGDF)        
               A            PAWD#D        10A  B  5 15DSPATR(PC)                     
               A                                      DSPATR(ND)                     
               A            ENTKY         16A  O  7  1MSGID(AAA 0098 SSMSGDF)              
               A            CMDKY6        12A  O  7 20MSGID(AAA 0019 SSMSGDF)              
               A            CMDKYH         4A  O  7 35MSGID(AAA 1437 SSMSGDF)              
               A            WMSGR1        41A  O  8  1TEXT('Messages')                     
               A                                      OVRDTA                               
               A                                      DSPATR(HI)                           
               A            WMSGR2        43A  O  9  1TEXT('Messages')                     
               A                                      OVRDTA                               
               A                                      DSPATR(HI)                           
               A          R MSFRCD02                                                       
               A*%%TS  SD  20041119  085954  TUYYAB      REL-V5R2M0  5722-WDS              
               A                                      WINDOW(2 1 10 16)                    
               A                                      CF06(06 'PREVIOUS')                  
               A                                      WDWBORDER((*DSPATR RI) (*CHAR '    - 
               A                                          '))                              
               A                                      USRRSTDSP                            
               A                                      OVERLAY                              
               A                                      PUTOVR                               
               A                                  1  1'Approval Window'                    
               A                                      DSPATR(RI)                           
               A                                  2  1'Supr:'                              
               A                                      DSPATR(HI)                           
               A            USER#D        10A  B  2  7                                     
               A  32                                  DSPATR(RI)                           
               A                                      DSPATR(PC)                           
               A                                  3  1'Pswd:'                              
               A                                      DSPATR(HI)                           
               A            PAWD#D        10A  B  3  7DSPATR(PC)                           
               A                                      DSPATR(ND)                           
               A            WMSGR21       16A  O  5  1OVRDTA                               
               A                                      DSPATR(HI)                           
               A            WMSGR22       16A  O  6  1OVRDTA                               
               A                                      DSPATR(HI)                           
               A            WMSGR23       16A  O  7  1OVRDTA                               
               A                                      DSPATR(HI)                           
               A            WMSGR24       16A  O  8  1OVRDTA                               
               A                                      DSPATR(HI)                           
               A            WMSGR25       16A  O  9  1OVRDTA                               
               A                                      DSPATR(HI)                           
               A                                  4  1'Ent=Cnt F6=Prv'

              Comment


              • #8
                Re: Blanking out the background screen when a window is displayed second time

                I don't see the attachement I said I uploaded

                Here is DSPF for the second approval window

                Code:
                 A                                      DSPSIZ(24 80 *DS3                  -   
                 A                                             27 132 *DS4)                    
                 A                                      PRINT                                  
                 A                                      HLPTITLE(' ')                          
                 A                                      HLPPNLGRP(MAIN MSHSCOVR)               
                 A                                      HELP                                   
                 A          R WIWXXX                                                           
                 A                                      ASSUME                                 
                 A                                      KEEP                                   
                 A                                      OVERLAY                                
                 A            DUMMYFLD       1A    24 79                                       
                 A*                                 1  3' '                                    
                 A*                                                                            
                 A          R MSFRCD01                                                         
                 A*%%TS  SD  20040818  161718  SETHEPALLI  REL-V5R2M0  5722-WDS                
                 A                                      WINDOW(*DFT 9 41)                      
                 A                                      CF06                                   
                 A                                      OVERLAY                                
                 A                                      WDWBORDER((*DSPATR RI) (*CHAR '    -   
                 A                                          '))                                
                A                                      USRRSTDSP                    
                A                                      PUTOVR                       
                A                                      OVRDTA                       
                A          H                           HLPPNLGRP(USER MSHSCOVR)     
                A                                      HLPARA(*FLD USER#D)          
                A          H                           HLPPNLGRP(PAWD MSHSCOVR)     
                A                                      HLPARA(*FLD PAWD#D)          
                A            HDNGS1        23A  O  1 10MSGID(AAA 5691 SSMSGDF)      
                A                                      DSPATR(RI)                   
                A            LABLD#        40A  O  2  2DSPATR(HI)                   
                A            APRLBL        13A  O  4  1DSPATR(HI)                   
                A                                      MSGID(AAA 4664 SSMSGDF)      
                A            USER#D        10A  B  4 15                             
                A  32                                  DSPATR(RI)                   
                A                                      DSPATR(PC)                   
                A            PWDLBL        13A  O  5  1DSPATR(HI)                   
                A                                      MSGID(AAA 4695 SSMSGDF)      
                A            PAWD#D        10A  B  5 15DSPATR(PC)                   
                A                                      DSPATR(ND)                   
                A            ENTKY         16A  O  7  1MSGID(AAA 0098 SSMSGDF)      
                 A            CMDKY6        12A  O  7 20MSGID(AAA 0019 SSMSGDF)              
                 A            CMDKYH         4A  O  7 35MSGID(AAA 1437 SSMSGDF)              
                 A            WMSGR1        41A  O  8  1TEXT('Messages')                     
                 A                                      OVRDTA                               
                 A                                      DSPATR(HI)                           
                 A          R MSFRCD02                                                       
                 A*%%TS  SD  20040818  161718  SETHEPALLI  REL-V5R2M0  5722-WDS              
                 A                                      WINDOW(5 1 09 18)                    
                 A                                      CF06                                 
                 A                                      OVERLAY                              
                 A                                      WDWBORDER((*DSPATR RI) (*CHAR '    - 
                 A                                          '))                              
                 A                                      USRRSTDSP                            
                 A                                      PUTOVR                               
                 A                                      OVRDTA                               
                 A            HDNGS2        18A  O  1  1                                     
                 A                                      MSGID(AAA 7524 SSMSGDF)              
                 A                                      DSPATR(RI)                           
                 A            LABLD1        18A  O  2  1DSPATR(HI)                           
                 A            LBL001         7A     4  1                                     
                 A                                      MSGID(AAA 7525 SSMSGDF)      
                 A                                      DSPATR(HI)                   
                 A            USER#D        10A  B  4  9                             
                 A  32                                  DSPATR(RI)                   
                 A                                      DSPATR(PC)                   
                 A            LBL002         7A  O  5  1                             
                 A                                      MSGID(AAA 7526 SSMSGDF)      
                 A                                      DSPATR(HI)                   
                 A            PAWD#D        10A  B  5  9DSPATR(PC)                   
                 A                                      DSPATR(ND)                   
                 A            FKEYEN         8A  O  7  1                             
                 A                                      MSGID(AAA 7527 SSMSGDF)      
                 A            FKEY06         8A  O  7 10                             
                 A                                      MSGID(AAA 7528 SSMSGDF)      
                 A            WMSGR2        18A  O  8  1TEXT('Messages')             
                 A                                      OVRDTA                       
                 A                                      DSPATR(HI)

                Comment


                • #9
                  Re: Blanking out the background screen when a window is displayed second time

                  Here is the "main screen" DSPF
                  Code:
                   A                                      DSPSIZ(24 80 *DS3)              
                   A                                      REF(*LIBL/SSPFLDREF)            
                   A                                      HLPTITLE('BANDING')             
                   A                                      PRINT                           
                   A                                      HELP                            
                   A                                      ERRSFL                          
                    *                                                                     
                   A          R WIWXXX                                                    
                   A                                      ASSUME                          
                   A                                      KEEP                            
                   A                                      OVERLAY                         
                   A            DUMMYFLD       1A    24 79                                
                   A*                                                                     
                  
                  
                  
                   A          R INFSFLREG                 SFL                                
                   A*%%TS  SD  20070503  164546  MALJKOVICO  REL-V5R3M0  5722-WDS            
                   A  30                                  SFLNXTCHG                          
                   A            @NOIBND   R        H      REFFLD(YNFL)                       
                   A                                      TEXT('No IBND record/substitute')  
                  .           
                  .
                  .
                   A            @ITEM1    R      00O 12  2REFFLD(ORLN)                        
                   A                                      TEXT('Item Number')                 
                   A                                      EDTCDE(Z)                           
                   A            @MTG#          7A  O 12  5TEXT('MST/Master Tag#')             
                   A            @ALWGT1        7Y 0O 12 13TEXT('Alocated Weight')             
                   A                                      EDTCDE(M)                           
                   A            @ODSC         28A  O 12 22TEXT('Product Description')         
                   A            @DIMENR       26A  O 12 51TEXT('Order or Tag Dimensions')     
                   A            @PACKG    R        O 12 78REFFLD(SPKC)                        
                   A                                      TEXT('Package Code')                
                  .                    
                  .                                                                                            
                   .
                   A          R INFCTLREG                 SFLCTL(INFSFLREG)                  
                   A*%%TS  SD  20070503  164546  MALJKOVICO  REL-V5R3M0  5722-WDS            
                   A                                      SFLSIZ(0006)                       
                   A                                      SFLPAG(0005)                       
                   A                                      OVERLAY                            
                   A                                      BLINK                              
                   A                                      CA01                               
                   A  51 70                               CF03                               
                   A  51                                  CF05                               
                   A  51                                  CF06                               
                   A                                      CF08                               
                   A  51 20N53                            CF09                               
                   A  23                                  CF12                               
                   A  51                                  CF13                               
                   A                                      CF17                               
                   A                                      CF16                               
                   A  22                                  CF20                               
                   A N51 23                               CF15                               
                   A                                      CF24                               
                   A* 75                                  ERASE(INFSFLREG)                   
                  A  70                                  SFLDSP                                
                  A  71                                  SFLCLR                                
                  A  72                                  SFLEND(*MORE)                         
                  A  73                                  SFLDSPCTL                             
                  A                                      SFLCSRRRN(&CSRRRN)                    
                  A                                      CSRLOC(CSRLNE     CSRPOS)             
                  A          H                           HLPPNLGRP(REGSCREN INHBDTGS)          
                  A                                      HLPARA(01 001 24 080)                 
                  A            SFLDS1         4S 0H      SFLRCDNBR                             
                  A            CSRLNE         3S 0H                                            
                  A            CSRPOS         3S 0H                                            
                  A            CSRRRN         5S 0H                                            
                  A                                  1  2'inmbdtgs'                            
                  A            CSCRMG        30A  O  1 26TEXT('Company heading')               
                  A                                  1 72DATE                                  
                  A                                      EDTCDE(Y)                             
                  A            LBLORD#       11A  O  2  2MSGID(AAA 0733 SSMSGDF)               
                  A                                      DSPATR(HI)                            
                  A            @ORDER    R    6Y00O  2 14REFFLD(ODNM)                          
                  A                                      TEXT('Order Number')                  
                  .
                  .                                                                                                        .

                  Comment


                  • #10
                    Re: Blanking out the background screen when a window is displayed second time

                    Now I keep forgetting to mention that there is one more display file - the very first one that is displayed before the "main" one that I keep mentioning
                    It is where user enters the order number and after which the "main" screen is displayed

                    At the time (any of the ) approval window is displayed two other dspfs are active

                    Here is the DSPF for that one
                    Code:
                     A                                      DSPSIZ(24 80 *DS3)        
                     A                                      HLPTITLE('BANDING')       
                     A                                      REF(*LIBL/SSPFLDREF)      
                     A                                      PRINT                     
                     A                                      HELP                      
                      *                                                               
                     A          R WIWXXX                                              
                     A                                      ASSUME                    
                     A                                      KEEP                      
                     A                                      OVERLAY                   
                     A            DUMMYFLD       1A    24 79                          
                      *                                                               
                     A          R INFSELORD                                           
                     A                                      OVERLAY                   
                     A                                      BLINK                     
                     A                                      CA01                      
                     A                                      CF05                      
                     A  19                                  CF10                      
                     A  13                                  CF13                      
                     A  23                                  CF15                      
                    A                                      TEXT('Item Number')              
                    A                                      EDTCDE(Z)                        
                    A  19                              2 24'*'                              
                    A N19        @BRKCOD   R        B  2 26REFFLD(BRCD)                     
                    A                                      TEXT('Break Code')               
                    A                                      CHECK(ER)                        
                    A  26                                  DSPATR(PC RI)                    
                    A            LBLBAND       18A  O  2 32MSGID(AAA 4740 SSMSGDF)          
                    A                                      TEXT('BANDING')                  
                    A                                      DSPATR(RI)                       
                    A                                  2 72TIME                             
                     *                                                                      
                     *                                                                                                       
                    A          R INFCMDORD                                             
                    A            MSGID          7A  H                                  
                    A N18 19     ENTER         16A  O 23  2MSGID(AAA 0098 SSMSGDF)     
                    A N18 19     CMD1           9A  O 23 24MSGID(AAA 0012 SSMSGDF)     
                    A N18 19     CMD10         19A  O 23 46MSGID(AAA 0061 SSMSGDF)     
                    A  18 19 23  CMD15         18A  O 23  2MSGID(AAA 3098 SSMSGDF)     
                    A  18 19     CMD17         15A  O 23 24MSGID(AAA 8028 SSMSGDF)     
                    A  18 19     HELP           4A  O 23 46MSGID(AAA 1437 SSMSGDF)     
                    A     19     CMD24         13A  O 23 68MSGID(AAA 0150 SSMSGDF)     
                     *                                                                 
                    A N20N19     ENTERA        16A  O 23  2MSGID(AAA 0098 SSMSGDF)     
                    A N20N19     CMD1A          9A  O 23 24MSGID(AAA 0012 SSMSGDF)     
                    A N20N19 13  CMD13A        18A  O 23 46MSGID(AAA 4772 SSMSGDF)     
                    A  20N19 23  CMD15A        18A  O 23  2MSGID(AAA 3098 SSMSGDF)     
                    A  20N19     CMD17A        15A  O 23 24MSGID(AAA 8028 SSMSGDF)     
                    A  20N19     HELPA          4A  O 23 46MSGID(AAA 1437 SSMSGDF)     
                    A    N19     CMD24A        13A  O 23 68MSGID(AAA 0150 SSMSGDF)     
                    A            @MSGORD       78A  O 24  2DSPATR(HI)

                    Comment


                    • #11
                      Re: Blanking out the background screen when a window is displayed second time

                      I have fouond the solution after trying many different things:

                      what I did is added the KEEP keyword to both "approwal window" record formats in the DSPFs. It works now.
                      The result is that I have first "approval window" displayed. Once user approves (enters id&pwd) second "approval window" appears. Everything on the background is still there, including the first "approval window" (that can be seen partially depending on the cursor positon) but it is not active.
                      It may be nicer if first approval window dissapears but I don't have solution for that. It is important that user can see the "main screen"

                      Thanks to all

                      Comment

                      Working...
                      X