|
try removeing the + from the %trim(+ line ----- Original Message ----- From: "Rich Duzenbury" <rduz@westernmidrange.com> To: <RPG400-L@midrange.com> Sent: Wednesday, October 10, 2001 3:45 PM Subject: bug in %editw / %trim? (V4R5) > %EditW is returning a string containing a leading blank for the edit code > given and data given, which is fine and expected. > > For my purposes, I want to %trim any blanks. In order to do so, I'm having > to store the edited date into an intermediate field, and then %trim it (The > second half of the sample, starting at line 10). > > If you try to compile the attached sample, it fails at line 7, with RNF7421 > 'Operands are not compatible with this type of operator'. AFAIK, that > should not be the case. > > Please advise. > > Regards, > Rich > > 0001.00 C z-add 7312001 #date 8 0 > 0002.00 C movel *blanks $dv 25 > 0003.00 C movel *blanks $dv2 25 > 0004.00 C* > 0005.00 C eval $dv = 'Date: ' + > 0006.00 C %trim( + > 0007.00 C %EditW(#date : ' / / ')) > 0008.00 C $dv dsply > 0009.00 C* > 0010.00 C eval $dv2 = %EditW(#date : ' / / ') > 0011.00 C eval $dv = 'Date: ' + > 0012.00 C %trim( $dv2 ) > 0013.00 C $dv dsply > 0014.00 C* > 0015.00 C seton lr > > _______________________________________________ > This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list > To post a message email: RPG400-L@midrange.com > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l > or email: RPG400-L-request@midrange.com > 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-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.