Ü   Window record type in display file

 

Below are the steps to create WINDOW record type in Display file:

 

(1)STRSDA

 


                      Work with Display Records                                
                                                                               
 File  . . . . . . :   QRPGLESRC              Member . . . . . . :   WIND_DSP2 
   Library . . . . :     AMIT                 Source type  . . . :   DSPF      
                                                                                
 Type options, press Enter.                                                    
   1=Add             2=Edit comments          3=Copy          4=Delete         
   7=Rename          8=Select keywords       12=Design image                   
                                                                               
 Opt  Order    Record        Type      Related Subfile   Date        DDS Error 
  1                                                                             
                                                                               
   (No records in file)                                                        
                                                                                
                                                                               
                                                              
                                                                               
                                                                                
                                                                         Bottom
 F3=Exit                     F12=Cancel      F14=File-level keywords           
 F15=File-level comments     F17=Subset      F24=More keys                     
                                                                       

 

 

 

 

(2)  Select the record type WINDOW.

 


                               Add New Record                                  
                                                                               
 File  . . . . . . :   QRPGLESRC              Member . . . . . . :   WIND_DSP2 
   Library . . . . :     AMIT                 Source type  . . . :   DSPF      
                                                                                
 Type choices, press Enter.                                                    
                                                                               
   New record  . . . . . . . . . . . . . . .   WIN001       Name               
                                                                               
   Type  . . . . . . . . . . . . . . . . . .   WINDOW       RECORD, USRDFN     
                                                            SFL,    SFLMSG     
                                                            WINDOW, WDWSFL     
                                                            PULDWN, PDNSFL     
                                                            MNUBAR             
                                                                               

                                                                               
                                                                               
 F3=Exit     F5=Refresh     F12=Cancel   

                                    

                                          

(3)Select the General keyword as ‘YES’

 


                          Select Window Keywords                               
                                                                               
 Window record . . . . . . . . . . . . . :    WIN001                           
                                                                               
 Type choices, press Enter.                                                    
                                                                               
                                     Y=Yes                                     
   General keywords  . . . . . . . .   Y                                       
   Select record keywords  . . . . .                                         
                                                                               
                                                                                
                                                                               
                                                                               
                                                                                
   TEXT keyword  . . . . . . . . . .                                           
                                                                               
                                                                                
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
 F3=Exit   F4=Display Selected Keywords   F12=Cancel     



 

 



(4)Select the General keywords as below:

 


                            Select General Keywords                            
                                                                               
 Window record . . . . . . . . . . . . . :   WIN001                            
                                                                               
 Type choices, press Enter.                                                    
                                                                               
                                                Keyword    Y=Yes  Indicators/+ 
                                                                                
   Window parameters  . . . . . . . . . . . .   WINDOW       Y                 
     Select parameters  . . . . . . . . . . .                Y >>> TO DEFINE WINDOW PARAMETER
   Window borders . . . . . . . . . . . . . .   WDWBORDER                      
     Select parameters  . . . . . . . . . . .                Y >>> TO SET THE ATTIBUTE FOR WINDOW BORDER
   Remove windows . . . . . . . . . . . . . .   RMVWDW                          
   User Restore Display . . . . . . . . . . .   USRRSTDSP                      
                                                                               
                                                                                
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
 F3=Exit   F12=Cancel         


 

(5)Define window parameters as below:

 

 

§  Actual line 

o   The actual line number is the starting row for the top of the window.

 

§  Actual position

o   The actual position number is the starting column for the upper-left corner of the window. 

 

§  Window lines

o   The number of rows to display in the window. 

 

§  Window position

o   The number of columns to display in the window.

 

 

 


                            Define Window Parameters                           
                                                                               
 Record . . . :    WIN001                                                      
 Keyword  . . :    WINDOW                                                      
                                                                               
 Referenced window  . . . . . . . . . . . .                      Name          
 -OR-                                                                          
 Window definition                                                             
   Default start positioning  . . . . . . .                      Y=Yes         
   -OR-                                                                        
   Start line                                                                  
     Program-to-system field  . . . . . . .                      Name          
     Actual line  . . . . . . . . . . . . .       2              1-25          
   Start position                                                              
     Program-to-system field  . . . . . . .                      Name          
     Actual position  . . . . . . . . . . .       10             1-128         
                                                                               
   Window lines . . . . . . . . . . . . . .      15              1-25          
   Window position  . . . . . . . . . . . .       40             1-128         
   Message line . . . . . . . . . . . . . .      Y               Y=Yes         
   Restrict cursor to window  . . . . . . .      Y               Y=Yes         
                                                                               
 F3=Exit   F12=Cancel                                                        


 

 



(6)Define window border parameters as below:

 

 


                      Define Window Border Parameters                          
                                                                               
 Record . . . :    WIN001                                                      
 Keyword  . . :    WDWBORDER                                                   
                                       Keyword number    Roll                  
                                         1   of  1                +/-          
                                                                  F4 for list  
                                                                                
 Indicators/+ . . . . . . . . . . . . . . . . . . .                            
                                                                               
                                                                                
 Color. . . . . . . . . . . . . . . . . . . . . . .      Y           Y=Yes     
   Define parameters  . . . . . . . . . . . . . . .      Y           Y=Yes     
                                                                                
 Display attributes . . . . . . . . . . . . . . . .      Y           Y=Yes     
   Define parameters  . . . . . . . . . . . . . . .      Y           Y=Yes     
                                                                                
 Border Characters  . . . . . . . . . . . . . . . .      Y           Y=Yes     
   Define parameters  . . . . . . . . . . . . . . .      Y           Y=Yes     
                                                                               
                                                                               
                                                                               
 F3=Exit   F12=Cancel                      

                                

 

 

                   

(7)Define window border color as below:

 


                          Select Border Color                                  
                                                                               
 Record . . . :    WIN001                                                      
 Keyword  . . :    WDWBORDER                                                   
                                                      Keyword number           
                                                         1  of  1              
 Type choices, press Enter.                                                    
                                                                               
                                                                                
 Colors:                                               COLOR     Y=Yes         
                                                                               
   Blue . . . . . . . . . . . . . . . . . . . . . .     BLU                    
   Green  . . . . . . . . . . . . . . . . . . . . .     GRN                    
   Pink . . . . . . . . . . . . . . . . . . . . . .     PNK                    
   Red  . . . . . . . . . . . . . . . . . . . . . .     RED                    
   Turquoise  . . . . . . . . . . . . . . . . . . .     TRQ                    
   White  . . . . . . . . . . . . . . . . . . . . .     WHT                    
   Yellow . . . . . . . . . . . . . . . . . . . . .     YLW        Y           
                                                                               
                                                                               
                                                                                
                                                                               
 F3=Exit   F12=Cancel                                                      

                                                                             

 

(8)Define window border attribute as below:

 


                     Select Border Display Attributes                          
                                                                               
 Record . . . :    WIN001                                                      
 Keyword  . . :    WDWBORDER                                                   
                                                      Keyword number           
                                                         1  of  1              
 Type choices, press Enter.                                                    
                                                                               
                                                                                
 Display attributes:                                   DSPATR    Y=Yes         
                                                                               
   High intensity . . . . . . . . . . . . . . . . .      HI                    
   Reverse image  . . . . . . . . . . . . . . . . .      RI        Y           
   Column separators  . . . . . . . . . . . . . . .      CS                    
   Blink  . . . . . . . . . . . . . . . . . . . . .      BL                    
   Nondisplay . . . . . . . . . . . . . . . . . . .      ND                    
   Underline  . . . . . . . . . . . . . . . . . . .      UL                    
                                                                                
                                                                               
                                                                               
                                                                                
                                                                               
 F3=Exit   F12=Cancel                

                      

 

 

                                   

(9)Define window border characters as below:

                    

 


                       Select Border Characters                                
                                                                               
 Record . . . :    WIN001                                                      
 Keyword  . . :    WDWBORDER                                                   
                                                      Keyword number           
                                                         1  of  1              
 Type choices, press Enter.                                                    
                                                                               
                                                                                
 Positions                                             CHARACTERS              
                                                                               
   Top-left-corner  . . . . . . . . . . . . . . . .        .                   
   Top-border . . . . . . . . . . . . . . . . . . .        .                   
   Top-right-corner . . . . . . . . . . . . . . . .        .                   
   Left-border  . . . . . . . . . . . . . . . . . .        :                   
   Right-border . . . . . . . . . . . . . . . . . .        :                   
   Bottom-left-corner . . . . . . . . . . . . . . .        :                   
   Bottom-border  . . . . . . . . . . . . . . . . .        .                    
   Bottom-right-corner  . . . . . . . . . . . . . .        :                   
                                                                               
                                                                                
                                                                               
 F3=Exit   F12=Cancel             

                       

 

 

(10)    Select record keyword as below:

 

 


                          Select Window Keywords                               
                                                                               
 Window record . . . . . . . . . . . . . :    WIN001                           
                                                                                
 Type choices, press Enter.                                                    
                                                                               
                                     Y=Yes                                     
   General keywords  . . . . . . . .                                           
   Select record keywords  . . . . .   Y                                       
                                                                                
                                                                               
                                                                               
                                                                                
                                                                               
   TEXT keyword  . . . . . . . . . .                                           
                                                                               
                                                                               
                                                                               
                                                                                
                                                                               
                                                                               
                                                                                
 F3=Exit   F4=Display Selected Keywords   F12=Cancel       


 

 



(11)    Select Indicator keyword as below:

 

 


                            Select Record Keywords                             
                                                                               
 Record . . . :   WIN001                                                       
                                                                                
 Type choices, press Enter.                                                    
                                                                               
                                     Y=Yes                                     
   General keywords  . . . . . . . .                                           
   Indicator keywords  . . . . . . .   Y                                       
   Application help  . . . . . . . .                                           
   Help keywords . . . . . . . . . .                                           
   Output keywords . . . . . . . . .                                           
   Input keywords  . . . . . . . . .                                           
   Overlay keywords  . . . . . . . .                                           
                                                                               
   Print keywords  . . . . . . . . .                                           
   ALTNAME keyword . . . . . . . . .                                           
                                                                               
   TEXT keyword  . . . . . . . . . .                                            
                                                                               
                                                                               
                                                                                
 F3=Exit   F4=Display Selected Keywords   F12=Cancel      

 

 

 

(12)    Define Indicators as below:

 


                           Define Indicator Keywords                           
                                                                               
 Record . . . :   WIN001                                                       
                                                                               
 Type keywords and parameters, press Enter.                                    
   Conditioned keywords:       CFnn CAnn CLEAR PAGEDOWN/ROLLUP PAGEUP/ROLLDOWN 
                               HOME HELP HLPRTN                                
   Unconditioned keywords:     INDTXT VLDCMDKEY SETOF CHANGE                   
                                                                                
 Keyword   Indicators/+ Resp Text                                              
 CA12                    12  PREVIOUS                                          
                                                                                
                                                                               
                                                                               
                                                                                

                                                       
                                                                               
                                                                         Bottom
 F3=Exit   F12=Cancel                          
                              


 

 

 

(13)    Record WIN001 is created as below:

 


                      Work with Display Records                                
                                                                               
 File  . . . . . . :   QRPGLESRC              Member . . . . . . :   WIND_DSP2 
   Library . . . . :     AMIT                 Source type  . . . :   DSPF      
                                                                                
 Type options, press Enter.                                                    
   1=Add             2=Edit comments          3=Copy          4=Delete         
   7=Rename          8=Select keywords       12=Design image                   
                                                                               
 Opt  Order    Record        Type      Related Subfile   Date        DDS Error 
                                                                                
 12      10    WIN001        WINDOW                      02/12/13              
                                                                               
                                                                                
                                                                               
                                                                               
                                                                     
                                                                                
                                                                         Bottom
 F3=Exit                     F12=Cancel      F14=File-level keywords           
 F15=File-level comments     F17=Subset      F24=More keys                     
 Record WIN001 added to member WIND_DSP2.  

 

 

 



(14)    We go to the design mode using option-12.

 

                                   




                                                                                
         ............................................                          
         :                                          :                          
         :                                          :                          
         :                                          :                           
         :                                          :   
         :                                          : 
         :                                          :                           
         :                                          :                           
         :                                          :                          
         :                                          :                           
         :                                          :   
         :                                          : 
         :                                          :                           
         :                                          :                          
         :                                          :                           
         :                                          :                             
         :                                          :                          
         :..........................................:                          
                                                                                
                                                                               
                                                                               
                                                                                
                                                                               
 Work screen for record WIN001: Press Help for function keys.                  
 

 


                

    

(15)    Now design the screen like this.



                                            
         ............................................                          
         :                                          :                          
         : 'ORG CODE'   'ACCOUNT NUMBER' 'CURRENCY' :
         :                                          :                           
         :                                          :   
         :                                          : 
         :                                          :                           
         :                                          :                           
         :                                          :                          
         :                                          :                           
         :                                          :   
         :                                          : 
         :                                          :                           
         :                                          :                          
         :                                          :                           
         : 'F12 = PREVIOUS'                         :                             
         :                                          :                          
         :..........................................:

     

 

 

 

 



                                  

(16)    PRESS F10, to import the fields from database.

              


                             Select Database Files                             
                                                                               
 Type options and names, press Enter.                                          
   1=Display database field list                                               
   2=Select all fields for input (I)                                           
   3=Select all fields for output (O)                                          
   4=Select all fields for both (B) input and output                           
                                                                                
 Option    Database File   Library      Record                                 
   1        MASTER         AMIT         REC1                                    
                                                                                
                                                                               
                                                                               
                                                                               
                                                             
                                                                               
                                                                               
 F3=Exit     F4=Prompt     F12=Cancel        


 

                                    

                          

(17)    Select the fields in output mode using option-3.

          

 


                            Select Database Fields                             
                                                                               
 Record . . . :   REC1                                                         
                                                                               
 Type information, press Enter.                                                
   Number of fields to roll  . . . . . . . . . . . . . . . . . .     8         
   Name of field to search for . . . . . . . . . . . . . . . . .               
                                                                               
 Type options, press Enter.                                                    
   1=Display extended field description                                        
   2=Select for input (I), 3=Select for output (O), 4=Select for both (B)      
                                                                                
 Option  Field        Length   Type    Column Heading                          
   3     ORG             3,0    S      ORG CODE                                
   3     ACC              12    A      ACC NUMBER                              
   3     CCY               3    A      CURRENCY                                
         OPENDT          8,0    P      OPEN DATE                               
         PARTY            12    A      PARTY NUM                               
         ACCSTS          1,0    S      A/C STS                                 
         ENTSTS          1,0    S      ENT STS                                 
         VERSTS          1,0    S      VER STS                                 
                                                                        More...
 F3=Exit   F12=Cancel 

                                                                                

 

 

 

(18)    We find all the fields available at the bottom of our screen.

 


         ............................................                          
         :                                          :                          
         :  ORG CODE    ACCOUNT NUMBER   CURRENCY   :
         :                                          :                           
         :                                          :   
         :                                          : 
         :                                          :                           
         :                                          :                           
         :                                          :                          
         :                                          :                           
         :                                          :   
         :                                          : 
         :                                          :                           
         :                                          :                          
         :                                          :                           
         :  F12 = PREVIOUS                          :                             
         :                                          :                          
         :..........................................:   
                                                                                   


                                                          
                                                                               
 1:ORG 2:ACC 3:CCY   

 

 

 

(19)    To display these selected fields on the screen, we put & and then Serial no. of the field.

 

 
         ............................................                          
         :                                          :                          
         : ORG CODE    ACCOUNT NUMBER   CURRENCY    :
         :                                          :                           
         :  &1           &2               &3        :   
         :                                          : 
         :                                          :                           
         :                                          :                           
         :                                          :                          
         :                                          :                           
         :                                          :   
         :                                          : 
         :                                          :                           
         :                                          :                          
         :                                          :                           
         :    F12 = PREVIOUS                        :                             
         :                                          :                          
         :..........................................: 
                       
                                                                               
                                                                               
                                                                                
                                                                               
                                                                               
 1:ORG 2:ACC 3:CCY      

 

 

              

(20)    Press ENTER and we see the fields as below.

     

 



         ............................................                          
         :                                          :                          
         : ORG CODE    ACCOUNT NUMBER   CURRENCY    :
         :                                          :
         :  666        OOOOOOOOOOOO      OOO        :
         :                                          :
         :                                          :
         :                                          :
         :                                          :
         :                                          :
         :                                          :
         :                                          :
         :                                          :
         :                                          :
         :                                          :
         :    F12 = PREVIOUS                        :
         :                                          : 
         :..........................................: 
                       
                                                                              
 
 

 

 

 

 

 

 



WDWTITLE

    Embeds text in the top border or bottom border of a window 

 

 

We add WDWTITLE here in the DDS.

 


Columns . . . :    1  80                       Edit                         AMIT/QRPGLESRC
SEU==>                                                                           WIND_DSP2
FMT DP .....AAN01N02N03T.Name++++++RLen++TDpBLinPosFunctions+++++++++++++++++++++++++++
*************** Beginning of data ********************************************************
0001.00      A                                      DSPSIZ(24 80 *DS3)
0002.00      A          R WIN001
0003.00      A                                      WINDOW(2 10 15 40)
0004.00      A                                      WDWTITLE((*TEXT 'SAMPLE WINDOW') +
0005.00      A                                               (*COLOR RED))
0007.00      A                                      CA12(12 'PREVIOUS')
0008.00      A                                      WDWBORDER((*COLOR YLW) (*DSPATR RI)-
0009.00      A                                       (*CHAR '...:::.:'))
0010.00      A                                 14  2'F12 = PREVIOUS'
0011.00      A                                  3  2'ORG CODE'
0012.00      A                                      DSPATR(HI)
0013.00      A                                  3 15'ACCOUNT NUMBER'
0014.00      A                                      DSPATR(HI)
0015.00      A                                  3 32'CURRENCY'
0016.00      A                                      DSPATR(HI)
0017.00      A            ORG       R        O  5  5REFFLD(REC1/ORG AMIT/MASTER)
0018.00      A            ACC       R        O  5 16REFFLD(REC1/ACC AMIT/MASTER)
0019.00      A            CCY       R        O  5 34REFFLD(REC1/CCY AMIT/MASTER)
****************** End of data ************************************************************



 

 

 

 

 


Columns . . . :    6  80              Browse                             AMIT/QRPGLESRC
SEU==>                                                                        WIND_PGM2
FMT FX FFilename++IPEASF.....L.....A.Device+.Keywords+++++++++++++++++++++++++++++
*************** Beginning of data ****************************************************
0001.00 FMASTER    IF   E           K DISK                                             
0002.00 FWIND_DSP2 CF   E             WORKSTN                                          
0003.00 C     *LOVAL        SETLL     REC1                                             
0004.00 C                   READ      REC1                                             
0005.00 C                   DOW       NOT %EOF() AND *IN12=*OFF                        
0006.00 C                   EXFMT     WIN001                                            
0007.00 C                   READ      REC1                                             
0008.00 C                   ENDDO                                                      
0009.00 C                   SETON                                        LR            
****************** End of data *******************************************************

 

 

 

OUTPUT


 
         ............... SAMPLE WINDOW ..............  
         :                                          :                          
         : ORG CODE    ACCOUNT NUMBER   CURRENCY    :
         :                                          :                           
         :  190        A00000000001      EUR        :   
         :                                          : 
         :                                          :                           
         :                                          :                           
         :                                          :                          
         :                                          :                           
         :                                          :   
         :                                          : 
         :                                          :                           
         :                                          :                          
         :                                          :                           
         :    F12 = PREVIOUS                        :                             
         :                                          :                          
         :..........................................:   
                       
                                            
                                                                               
PRESS F12 TO EXIT OR ENTER TO DISPLAY ANOTHER RECORD FROM FILE MASTER.
 
 

 

 

 




 

 







User Comments:



Subscribe

.  


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