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



Tom Westdorp wrote:

>It is indeed semantics and I am only taking about numbers.
>Regardless of the format of the number (zoned, packed, 
>binary, hex, etc) the value of a five position 123 is 00123.

And the "value" of a negative number?  I can honestly say that I've never
seen anybody write a negative amount like "-000123".  I concur that the
documentation needs clarification, but the examples clearly demonstrate how
the BIF works for time and date fields.  They're left-adjusted (see the
middle EVAL.)  There's no reason to suspect that the behaviour is any
different for numeric values.

You've had the good fortune of not monitoring the list several years ago
when the common question was the exact reverse of yours: "How can I put an
edited numeric value in a string, i.e. Your balance is 123.45?"  It seems to
me that IBM created %char() to solve that.  Especially for date and
timestamp values, which can't be "transformed" to character by %edit().

I'm going to email the documentation folks at torrcf@ca.ibm.com (see RPG
Reference section entitled "How to Send in Your Comments") and ask them to
detail the fact that the values are left-adjusted, zero suppressed, leading
minus sign (for numerics!)  May I suggest that you add your voice?

Buck Calabro
Aptis; Albany, NY
"Nothing is so firmly believed as
 that which we least know" -- Michel Montaigne
Visit the Midrange archives at http://www.midrange.com
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

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.