× 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.


  • Subject: Eval expression problem
  • From: Steve Moland <Steve@xxxxxxxxxxx>
  • Date: Wed, 28 Jun 2000 14:26:21 -0400

Title: Eval expression problem

I can't seem to figure out why the first example does not produce
the same answer as the second very kludge example.
The day and year and time do not make it into the output field in example 1.

"Months" is an array of month names.
RSFLIB is 10 character (so says RPG ) variable length field
     in a file created by SQL. It contains "TRRSF999P"
Lmm is a 2 byte signed numeric field containing  05
Ldd is a 2 byte signed numeric field containing  28
Lyyyy is a 4 byte character field containing  2000
Lhhmmss is a 6 byte signed numeric field containing  010647
#Time is a 8 byte character field
LOGTEXT is 50 character field.

I                        *VAR A  113  124  RSFLIB 

Example 1
Eval                    logtext = RSFLIB + ' was rebuilt on ' + 
                        Months(Lmm) + %editw(Ldd : ' 0') +   
                        ', ' + Lyyyy  +                            
                        ' at ' + %editw(Lhhmmss : '0 :  :  ')      

LOGTEXT = 'TRRSF999P was rebuilt on May                      ' 

Example 2
Eval                    logtext = RSFLIB + ' was rebuilt on ' +    
                        Months(Lmm)                                
eval                    logtext = %trimr(logtext) + ' ' +          
                        %editw(Ldd : ' 0')            
eval                    logtext = %trimr(logtext) + ', ' + lyyyy
eval                    logtext = %trimr(logtext) + ' at '
eval                    #time  =  %editw(Lhhmmss : '0 :  :
eval                    logtext = %trimr(logtext) + ' ' + #time   

LOGTEXT = 'TRRSF999P was rebuilt on May 28, 2000 at  1:06:47 '

Thanks for looking at this
Steve


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.