|
Seth.D.Shields=zpSsaXpf3Hw@public.gmane.org wrote:
Hi all, I am trying to convert a numeric field to a character field. The numeric field has a decimal (14,2). The character field must 1) keep leading zeros, 2) keep the decimal point and 3) have no commas. ex. D Num s 14p 2 D MyDS ds 25 D field 1 10 Overlay(MyDS) D Alpha 15 Overlay(MyDS:*next) Num = 210.23 Alpha = "000000000210.23" I know how to jump thru hoops with data structures to do this. (I want to avoid this method.) I know how to do this with %editw (I will use this if no %editc is available to suite my purposes, but prefer to avoid this method.) I normally use %editc( field : 'X' ) which keeps leading 0s, but found out that it drops the decimal point, so it is only useful for integer values. Does anyone know of another %editc that I am missing or another way of doing this?
Well, if %EDITW does what you want, then why not just use that? But if you want to avoid %EDITW, then you can always try: %xlate(' ':'0':%editc(num:'3')) Cheers! Hans
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.