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



I have been reading the archives and looking at the MI Reference manual but I just can't figure out what I'm doing wrong. I am trying to convert a 5-digit packed value into a character value. cvthc is only converting the first byte. My test value is 12345F and my results are 12, only the first byte. The manual shows an example where it is converting a 9-byte value to character with one call. I have verified that the length I am passing is 5. I also tried 6. Any thoughts on what I'm doing wrong?

This is the prototype:
d HexToChar pr ExtProc('cvthc')
d Receiver * Value
d Source * Value
d Length 10u 0

This is the function call:
HexToChar(%Addr(ReplaceString)
:NameValuePairs.dsNameValue(Ctr).Value
:NameValuePairs.dsNameValue(Ctr).ValueByteLength);

Definitions:
d ReplaceString s 64a


d dsNamesValues...
d ds Qualified Based(Dummy)
d NumberOfValues...
d 5u 0
d dsNameValue LikeDS(dsNameValue_t) Dim(1000)


d dsNameValue_t ds Qualified Based(Dummy)
d Name 32a
d DataType 3u 0
d NumericLength 3u 0
d Decimals 3u 0
d DTZFormat 3u 0
d DTSeparator 1a
d ValueByteLength...
d 10u 0
d MaxValueByteLength...
d 10u 0
d Value *

Rick Chevalier
IT Software Solutions - Loan Servicing
GM Financial/AmeriCredit
817-525-7178 (w)


________________________________
Privileged and Confidential. This e-mail, and any attachments there to, is intended only for use by the addressee(s) named herein and may contain privileged or confidential information. If you have received this e-mail in error, please notify me immediately by a return e-mail and delete this e-mail. You are hereby notified that any dissemination, distribution or copying of this e-mail and/or any attachments thereto, is strictly prohibited.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.