×
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.
Hmmm... seems perhaps the resolution was actually for a request
to convert binary data to a hex character string represention, such
that the response I originally had composed below is no longer
relevant.? I will send that text as a reply anyhow, since neither
the subject nor the description of the outcome IMO seem to match the
apparent solution, and per a later comment of uncertainty about the
solution suggesting that "same thing wrong as I did before...passing
the character instead of the integer...I think".
Is it possible that there is another nibble [before & after] or
byte [before or after] that is part of the binary data [but not
integer apparently] described as embedded within character string
data? Perhaps something was overlooked, such that there is more of
the hex string available than was presented here; e.g. the full
string, delimited by an EBCDIC upper case A, might be for example
one of?:
x'C1199900C1' or x'C11999000FC1' or x'C10199900FC1'
As shown and then described as how the value is interpreted, the
hex string as binary data x'199900' appears to be unsigned packed
[binary coded] decimal. A simple overlay as decimal will work for
signed packed BCD data, but there is no such support that I am aware
of for unsigned packed BCD. If the value might instead be
x'0199900F' representing the decimal value 199900, then the overlay
is simply four bytes defined as either P(6,#) or P(7,#) variable.
Regards, Chuck
Michael Ryan wrote:
I want to see 199900. I get it as part of a character string that
has x'199900' in it. I need to convert that to decimal, 199900.
On Tue, Mar 30, 2010 at 11:28 AM, Dennis Lovelady wrote:
What are the rules for a longer hex field? Like x'199900'
- 3 bytes of hex, and I need to convert it to 199900.
I don't understand your question. Hex is short for hexadecimal,
and hexadecimal indicates base 16. The value 199900 base 16 is
1677568 decimal.
Let's start with: what do you really want to see? 199900 or
1677568?
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.