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 mailing list archive is Copyright 1997-2025 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.