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



Thanks I will probably use as many calls to my procedure as necessary. It means, however, having to bodge the output together in an XSL file. You were right Adam, the 132 character parameter came from our DDS dictionary, but now the output is XML instead of the PRTF. Why we continued using the same REFFLD I don't know.

What worries me is, the person who wrote this code, which I have found in several places, obviously thought that the compiler would protect him from this error. Now if I DID enlarge the parameter for writeText, I'd have to test EVERYTHING that used it. Other programmers might have WANTED the truncation to occur.



-----Message d'origine-----
De : rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] De la part de Adam Glauser
Envoyé : jeudi 15 janvier 2009 15:50
À : rpg400-l@xxxxxxxxxxxx
Objet : Re: Prototype problem

rob@xxxxxxxxx wrote:
Now, if you're thinking that
gTxt1='I am not full';
gTxt2='Neither am I';
gTxt3='Nor I';
Then you should do
writeText(%trim(gTxt1) + ' ' + %trim(gTxt2) + ' ' + %trim(gTxt3) );

Or even

len1 = %len(%trim(gTxt1));
len2 = %len(%trim(gTxt2));
len3 = %len(%trim(gTxt3));
if ((len1 + len2 + len3) > 132);
writeText(%trim(gTxt1) + ' ' + %trim(gTxt2) + ' ' + %trim(gTxt3));

elseif ((len1 + len2) > 132);
writeText(%trim(gTxt1) + ' ' + %trim(gTxt2));
writeText(gTxt3);

else;
writeText(gTxt1);
writeText(gTxt2);
writeText(gTxt3);

endif;
--
This is the RPG programming on the IBM i / System i (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 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.