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



+1


Paul

-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxx> On Behalf Of Roger Harman
Sent: Tuesday, June 5, 2018 6:57 PM
To: RPG programming on the IBM i (AS/400 and iSeries)
<rpg400-l@xxxxxxxxxxxx>
Subject: Re: NEVER MIND! %TRIMR on return value from Proc not compatible

That's why I always line up the '+' under the '=' and do one element per
line.

workBookName = 'FinancialProjections_'
                       + %trim(glb_tradename)
+ '_'
+  %editc(nMarketingPeriod : 'X')
+ '_'
+ %trimr(getProjTypeName(glb_projType))
+  '_'
+ %char(%timestamp())
+ '.xls';

Roger Harman
COMMON Certified Application Developer - ILE RPG on IBM i on Power

 
 




From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxx> on behalf of Therrien, Paul
<ptherrien@xxxxxxxxxxx>
Sent: Tuesday, June 5, 2018 2:56 PM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: NEVER MIND! %TRIMR on return value from Proc not compatible
 

I just noticed the double '+' before the %trimr().

Time to go home!
------

I have a procedure that returns a character value.
I attempt to use %trimr() on the returned value.
The compiler says: RNF7421 Operands are not compatible with the type of
operator.

The compiler shows the error is on the %trimr(getProjTypeName(glb_projType))

Code:

workBookName = 'FinancialProjections_' +
                       %trim(glb_tradename) + '_' +
                       %editc(nMarketingPeriod : 'X') + '_' +
                      + %trimr(getProjTypeName(glb_projType)) +
                       '_' + %char(%timestamp()) + '.xls';

dcl-proc getProjTypeName;
       dcl-pi getProjTypeName                char(12) ;
          in_projectionType                  like(glb_projtype);
       end-pi;

          if in_projectionType = aProjtype_WEB;
             return 'WEB_ONLY';
          else;
             return 'Non_Web';
          endif;
end-proc getProjTypeName;

We are at V7R3.

I am feeling a bit dull right now.

Paul

+++++ This email and related attachments may contain confidential
information intended exclusively for the addressee. Unauthorized use,
disclosure or distribution of this material is prohibited. If you received
this message in error, please advise the sender and delete all copies of
it. Content is provided by the individual sender and does not necessarily
reflect the views of the Company. Though sender believes this transmission
to be virus-free, it is the recipient's responsibility to ensure that it is.

--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l


RPG400-L Info Page - lists.midrange.com
lists.midrange.com
To unsubscribe from RPG400-L, get a password reminder, or change your
subscription options enter your subscription email address:

or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link:
http://amzn.to/2dEadiD


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.