|
<<SNIP>>
I am trying to write a generic procedure to retrieve a data area that
is a decimal value. Currently, we have to adjust the procedure every
time we need to handle a new size, and then we have to add variables
and specific code for that size.
I am trying to use the QWCRDTAA to retrieve the value and ultimately
want return a decimal of 30p 9 that contains what ever was found in
the data area. Problem is, the data comes back as hex from QWCRDTAA
(the raw decimal data). Obviously I could just MOVE the data if I
wanted to define decimals of all possible sizes, but then I am back
to the very thing I am trying to avoid.
As a part of my procedure, I pass in the definition of the data area,
so I know that at run time. What is the quickest way to get that
raw/hex data into a decimal variable I can work with? If you were to
put the logic I am looking for into a procedure, the prototype to
convert this character/hex data would need to look something like
this:
D HexToPacked pi 30p 9
D pHex 2000a
D pDecLen 5i 0
D pDecPrecision 5i 0
<<SNIP>>
As an Amazon Associate we earn from qualifying purchases.
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.