× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I have run into a problem in controlling a display file correctly.  Below is 
the DSP DDS:

 A*%%TS  SD  20041226  212310  DPALME      REL-V5R2M0  5722-WDS              
 A*%%EC                                                                      
 A                                      DSPSIZ(24 80 *DS3)                   
 A          R PRTRAENTRY                                                     
 A*%%TS  SD  20041225  211712  DPALME      REL-V5R2M0  5722-WDS              
 A                                      CF12(12 'F12=EXIT')                  
 A                                  1  4DATE                                 
 A                                      EDTCDE(Y)                            
 A                                  1 22'COUNTRY WIDE TRANSPORT SERVICES, I- 
 A                                      NC.'                                 
 A                                      COLOR(WHT)                           
 A                                  1 68USER                                 
 A                                  2 28'PARYOLL TRANSACTION ENTRY'          
 A                                  7 27'DATE:'                              
 A                                  8 26'EMPNO:'                             
 A            DEMPNO         7S 0I  8 33DSPATR(UL)                           
 A                                  9 24'LOAD NO:'                           
 A            DLDNO          7S 0I  9 33DSPATR(UL)                           
 A                                 10 20'DESCRIPTION:'                       
 A                                 11 18'GL ACCOUNT NO:'            
 A            DGLACTNO       6S 0I 11 33DSPATR(UL)                  
 A                                      CHECK(ER)                   
 A                                      CHANGE(20)                  
 A     71                               ERRMSG('INVALID GL CODE' 71)
 A                                 12 25'AMOUNT:'                   
 A            DAMT           7S 0I 12 33                            
 A                                 23 10'F12=EXIT'                  
 A                                 23 60'F10=UPDATE'                
 A            DDESC         30A  I 10 33                            
 A            DDATE           L  B  7 33DATFMT(*USA)                 

I am sending this display to the screen with an exfmt command.  The user 
then enters the data, date, driver no, load no, description, gl code, 
amount.  I need to verify some of the data to make sure that it is correct, 
IE: GL Account Code.  so I have set the CHECK(ER) on the DGLACTNO so that it 
returns control to the program and verifies the number the user entered.  
The problem is I need to reposition the cursosr so that it will continue 
with the next line and wait for more input.

Here is the RPG code I have written thus far:

C                   MOVE      *DATE         MYDATE  
C                   MOVE      MYDATE        DDATE   
C                   DOU       *IN12 = *ON           
C                   EXFMT     PRTRAENTRY            
 *       VERIFY GL ACCOUNT CODE                    
C     DGLACTNO      CHAIN     CHTACTS              
C                   IF        NOT %FOUND           
C                   EVAL      *IN71 = *ON          
C                   ELSE                           
C                   EVAL      DGLACTNO = DGLACTNO  
C                   ENDIF                          
C                   ENDDO                          
C                   EVAL      *INLR = *ON          
C                   RETURN                         

Any suggestions would be greatly appreciated, because I will need to add in 
verification for the load number and driver number before the program is 
complete.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.