|
I seem to barely recall having a problem where the compiler was complaining about something that didn't seem to be true. Deleting the line and retyping it corrected the problem. I wrote it off to having some undisplayable character in the source line. Charles > -----Original Message----- > From: Robert Clay [mailto:rclay@xxxxxxxxxxxx] > Sent: Monday, May 24, 2004 2:28 PM > To: RPG programming on the AS400 / iSeries > Subject: RE: Need a sanity check, please > > > Scott, > > Now I'm REALLY confused. > > I clipped my line of code and inserted yours. Compiled > perfectly. However, I can't see a difference between your > line and mine. > > What gives? > > Robert > > -----Original Message----- > From: rpg400-l-bounces@xxxxxxxxxxxx > [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Scott Klement > Sent: Monday, May 24, 2004 2:03 PM > To: RPG programming on the AS400 / iSeries > Subject: Re: Need a sanity check, please > > > Hi Robert, > > [SNIP] > > PASTMONTH = %char(atoi(%subst(MONTHID:1:4))-1) + %subst(MONTHID:5:2) > [SNIP] > > RNF0955 Item is not valid as the left-hand side of an EVAL > operation. > > I have to say that I'm a bit frustrated at this thread. > You've got people > blaming the problem on atoi(), you've got people blaming the > problem on > %char(), or saying that the expression needs to all be in > %char(), or that > the file might not be open... and all of these things are COMPLETELY > IRRELEVANT to the error message. > > The error is that it can't assign something to PASTMONTH. > Something in > the definition of PASTMONTH is making appear as something > that can't be > modified. Either its a CONST parameter, or in some other way, it's > something that you're not allowed to change. > > For my own sanity, I tried the following program. It works > perfectly, no > errors during compile or runtime, and it achieves the results > that you're > looking for: > > H DFTACTGRP(*NO) BNDDIR('QC2LE') > > D atoi pr 10I 0 extproc('atoi') > D charValue * value options(*string) > > D MONTHID S 6A inz('200404') > D PASTMONTH S 6A > > /free > > PASTMONTH = %char(atoi(%subst(MONTHID:1:4))-1) + > %subst(MONTHID:5:2); > *inlr = *on; > > /end-free > > _______________________________________________ > This is the RPG programming on the AS400 / iSeries (RPG400-L) > mailing list > To post a message email: RPG400-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/rpg400-l > or email: RPG400-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpg400-l. > > > > > _______________________________________________ > This is the RPG programming on the AS400 / iSeries (RPG400-L) > mailing list > To post a message email: RPG400-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/rpg400-l > or email: RPG400-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpg400-l. >
As an Amazon Associate we earn from qualifying purchases.
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.