TexAS400 Tutorial


TUTD010 in QDDSSRC in USER000



A* The next line tells the compiler to REFER to the file CUST     
A*     whenever a field is defined using the R option             
A                                      REF(CUST)            
A*                                                                
A*----------------------------------------------------------------
A* Each Screen is a record. Records start with a line like the    
A* next one. This names the record SCRN1.                          
A          R SCRN1                                                
A*                                                                
A* The next line defines F3 as a valid key. It also associates    
A* the key with indicator 3. So, if the user presses F3,          
A* indicator 3 will be turned on.                                 
A                                      CF03(03)                   
A* USER, DATE and TIME are system values that are automatically     
A* filled in.                                                     
A                                  1  2USER                     
A* The title has a Display Attribute of HI. This makes it white.
A                                  1 29'Customer Maintenance'   
A                                      DSPATR(HI)               
A* Edit Code Y displays the date in xx/xx/xx format.             
A                                  1 69DATE                     
A                                      EDTCDE(Y)                
A                                  2  2'CUSD010'                
A                                  2 69TIME                     
A                                  6 28'(A)dd'                  
A                                  7 28'(C)hange'               
A                                  8 28'(D)elete'               
A* The next line defines a field named DSPACT.                  
A* It is 1 character, is an Input field and is white.           
A            DSPACT         1A  I  8 41DSPATR(HI)               
A                                 10 29'Cust#'                  
A* The next line defines a field named DSPCST.                  
A* It is 6 numeric, is an Input field and is white.               
A            DSPCST         4Y 0I 10 41DSPATR(HI)
A* The last field will be used for error messages.                 
A* It is 79 characters and will display in reverse image if       
A* indicator 90 is turned on.                                     
A            DSPMSG        79A    22  1                           
A  90                                  DSPATR(RI)                 
A                                 23  7'F3=Exit'                  
A*----------------------------------------------------------------
A* The next screen will be used to CHANGE a record                
A*                                                                
A* The next line defines F12 as a valid key. It also associates   
A* the key with indicator 12.                                     
A          R SCRN2                                                
A                                      CF12(12)                   
A                                  1  2USER                       
A                                  1 29'Customer Maintenance'     
A                                      DSPATR(HI)               
A                                  1 69DATE                     
A                                      EDTCDE(Y)                
A                                  2  2'CUSD010'                
A                                  2 35'CHANGE'                 
A                                      DSPATR(RI)               
A                                  2 69TIME                     
A                                  3 29'Customer#'              
A* Since the next field has in R in Ref, the AS/400 will look   
A* for this field in the file CUST defined in the REF option    
A* at the beginning of this DDS source. It will define this     
A* CSNBR so it is the same type and length as the CSNBR in CUST. 
A* Also, this field is an Output field. This means that the user
A* will not be able to change its value.                        
A            CSNBR     R        O  3 39EDTCDE(4)                
A                                  6  6'Name'                   
A* The next field has use of B. B means both Input and Output.  
A            CSNAME    R        B  6 16DSPATR(HI)               
A                                  7  6'Address'                
A            CSADR1    R        B  7 16DSPATR(HI)               
A                                  8  6'City'                   
A            CSCTY     R        B  8 16DSPATR(HI)               
A                                  9  6'State'                  
A            CSSTE     R        B  9 16DSPATR(HI)               
A                                  9 24'Zip'                    
A            CSZIP     R        B  9 28DSPATR(HI)
A            DSPMSG        79A    22  1                         
A  90                                  DSPATR(RI)               
A                                 23 18'F12=Cancel'             

 

 

Back to Table of Contents   |   Main Page