On 2017-10-11 2:22 PM, Brian Johnson wrote:
I don't see why not. For example (assuming CCSID 37) for a
packed(3:0) with value 146 you would have x'146F', right? Viewed as
characters that would be an SO and '?'.

On Wed, Oct 11, 2017 at 11:02 AM, Jon Paris <jon.paris@xxxxxxxxxxxxxx> wrote:

Given that SO (X'14') and SI (X'15') can't occur in a packed number, the technique I described of using a DS to "convert" packed to character would appear to be a valid approach. But as you note it wouldn't work for an integer.


Jon is right that the SO/SI isn't an issue for packed, he just gave the wrong hex values for them. Actually, SO is x'0E' (decimal 14) and SI is x'0F' (decimal 15).

x'0E' could theoretically occur at the end of a packed number, but only if the preferred signs of x'D' and x'F' weren't being used. I don't think that applies here.

x'0F' could reasonably occur at the end of a packed number, but I believe it's only interpreted as SI if the SO (x'0E') preceded it in the string.


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.