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



John,

You don't need to use the *VARY option on the substitution parameter. If you
define the substitution parameter as long as the alphanumeric edited number
could be and do a %TRIM(%EDITC(number:'1')) to fill your parameter, the OS
will trim any trailing blanks from the parameter while performing the
substitution. We do it all the time with our QHMSNDPM wrapper and produce
results like your GOOD example.

HTH,
Roger Mackie

-----Original Message-----
From: Rusling, John B. (Alliance) [mailto:jbrusling@alliancedev.com]
Sent: Wednesday, April 03, 2002 11:46 AM
To: 'RPG400-L@midrange.com'
Subject: Message File Variable Length &1 Substitution Parameters


I would like to put a number in an error message as a substitution
parameter. I'll edit it into a character field first,

Then...

I want it to read nice, ie.
if the number is 115090 (say 11 long, 2 decimal)
i want it to appear in string as: 1,150.90 but
in a readable fashion

GOOD...:   Yadda yadda 1,150.90 sumtin else.
NO GOOD:   Yadda yadda     1,150.90 sumtin else.

Another time the number might be 187.25

I don't want to end up with:

NO GOOD: Yadda yadda       187.25 sumtin else.

which looks even more 'unprofessional'.



>From the work with messages msgfile screen:
-----------------------------------------------------------
                      Change Message Description (CHGMSGD)

 Type choices, press Enter.

 Message data fields formats:     _
   Data type  . . . . . . . . . .   *CHAR___      *SAME, *NONE, *QTDCHAR...
   Length . . . . . . . . . . . .   *VARY_        Number, *VARY
   *VARY bytes or dec pos . . . .   2_____        Number
                + for more values _
-----------------------------------------------------------


They give you the option to specify substitution parms
as being *VARY for size  BUT...

How da heck do I use it?

Message ID is.....: 'JBR0120'
Message text like.:  Yadda yadda &1 sumtin else.

We use a wrapper on the QHMSNDPM api to send messages to
 bottom of screen into a one line subfile that can hold
 multiple msgs and be scrolled.



Thanks.

John B.
_______________________________________________


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.