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



but when I do that, the %subst operation converts all non-displayable
hexadecimal chars to blanks...

No it doesn't.  %Subst will not change anything - it has no awareness of the
data content.  If what you say were true there would be many many programs
that would fail.

Check it out in debug and look at the hex values that way if you don't
believe me.

If you _know_ that the packed data is in position 110 why not simply
redefine it that way in the DS?

Just in case you can't, then here is a generic conversion approach - adjust
the size as needed for different packed field sizes.  You could also build a
completely generic routine based on the same notion.

     D convertDS       DS                  
     D  packedfield                   3P 0 

All you need to do is:

convertDS = %subst(rcd:110:2);

packedField now has the value you want.

You could also play around with pointers etc. but this will do it.

Jon Paris
Partner400

www.Partner400.com 


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.