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



>From: "Rusling, John B. (Alliance)" <jbrusling@alliancedev.com>
>Date: Wed, 3 Apr 2002 11:45:58 -0600
>
>I would like to put a number in an error message as a substitution
>parameter. I'll edit it into a character field first,
> ...
>GOOD...:   Yadda yadda 1,150.90 sumtin else.
>NO GOOD:   Yadda yadda     1,150.90 sumtin else.

John, just make sure the edited value is left-justified in the
character field.  Trailing blanks in the replacement text are
not included in the final message.

Left justification is easy:

c           eval    reptext = %triml(%editc(num : 'N'))

If you were using *VARY, you'd have to left-justify the value
anyway, so using *VARY will just make things more complicated.
If I recall correctly, with *VARY, you have to put the length
of the data first (2 or 4 byte binary), then the data, and then
all the subsequent fields have to follow that length of data
directly.  So you can't use a nice data structure for the
replacement text - you have to build it dynamically.

Barbara Morris



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.