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



On 2/24/2011 5:44 PM, Mark Murphy/STAR BASE Consulting Inc. wrote:
I would expect 12345F if the rick had specified 6 nibbles, but 12345
if only 5 nibbles were requested. Now that I think about it more,
'X' works like MOVEL, so should strip even the implied decimal, but I
don't think it changes negative numbers to letters, or it could.
That will have to be tested.


Rick doesn't have a packed variable that he can use with %EDITC. He has a string with a packed value in it, where the length (and decimals) are not known at compile time.

Rick, if you know that you will never get a value with more than 31 digits, you could define a packed(63,31) variable in your program, and use LBCPYNV to assign the packed value in your string to that packed variable. Then you could use %CHAR on the packed variable. That would handle negatives correctly. You'd probably want to trim off trailing zeros if the input value has decimals.

http://archive.midrange.com/rpg400-l/200605/msg00738.html

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.