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



Nick Arndt wrote:
Hi all,

How would you do the following in EGL: mychar = %editc(mynbr:'X');

My fields are defigned as such:

mynbr decimal(6,0);
mychar char(6);


when I do mychar = mynbr

I get: "76855 ". The result I would like is "076855"

Any Idea on how to do this?
It's not a one-for-one replacement, but if you know the length it's pretty simple:

mychar = formatNumber(mynbr, "&&&&&&");

The upside to formatNumber is that it has a bit more flexibility: Here's the 6.0 documentation:

http://publib.boulder.ibm.com/infocenter/radhelp/v6r0m1/index.jsp?topic=/com.ibm.etools.egl.doc/topics/reglinf0019.html

http://tinyurl.com/4m57rf

Joe

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.