|
Thanks Barbara. I hate to admit it but I hadn't considered
negative numbers yet. I'll take a look at LBCPYNV.
The decimal positions shouldn't be an issue.
On 2/24/11 4:01 PM, Barbara Morris wrote:
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
On 2/24/11 12:30 PM, Rick.Chevalier@xxxxxxxxxxxxxxx wrote:
Sorry, I wasn't clear. It is a character representation of a
packed field. The source value is a character field that looks
like x'12345F'. The length could vary as well as the decimal
places. I am 'unpacking' it into a character field that will
have '12345'.
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.