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



> From: Smith, Nelson
>
> I'm trying to use cvtch to convert hex data to character, and I'm
> getting a space offset error.

This is the dreaded 'B' binary data type issue.

D  hexFunctCode                  4B 0

The above does NOT define a binary field 4 bytes long.  It defines a binary
field which can hold four digits of information, which is actually a
two-byte field.  So you want to be converting a 2-byte hex field into a
4-byte character field.  Change your code as shown:


D  hexFunctCode                  4B 0
D  alp2HexBytes                  2A   OVERLAY(ds_ZDAQ0200:29)

D  alp4CharBytes  S              4A   INZ

C                   CALLP     cvtch(%ADDR(alp4CharBytes)
C                                  :%ADDR(alp2HexBytes)
C                                  :%Len(alp4CharBytes)  )


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.