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



Of course REXX is great for that... But I had actually already noted that the existing scalar function DIGITS() suffices as an effective LPAD() /for numeric/ data [types]. Maybe presenting it with CAST() to DECIMAL confused the explanation, or perhaps it was missed entirely.?
Maybe the following script with an actual report output to describe:

declare global temporary table z9 (locid) as
(select decimal(12345, 9, 0) from qsys2.qsqptabl)
with data with replace

select digits(locid) as lpad_like from session.z9
....+....
LPAD_LIKE
000012345
******** End of data ********

The DIGITS() scalar function does an implicit cast to character the /same/ as EDTWRD('0 ') would effect; and much like EDTCDE(X), except only for positive numerics.

Regards, Chuck

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.