|
Ran into something similar to this a few weeks ago....
When adding in the Months(Lmm), you must %trimr it to remove
trailing blanks. You don't say how you defined you Months array, so
I'd guess each element is 9A. That however doesn't seem to be the
case as you should still see part of the date and time fields.
Check your Months definition.
Eval logtext = RSFLIB + ' was rebuilt on ' +
%trimr(Months(Lmm)) + %editw(Ldd : ' 0') +
', ' + Lyyyy + ' at ' +
%editw(Lhhmmss : '0 : : ')
______________________________ Reply Separator _________________________________
Subject: Eval expression problem
Author: <RPG400-L@midrange.com> at INET_WACO
Date: 6/28/00 2:26 PM
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
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.