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



On 7/8/24 5:09 PM, Dan Bale wrote:
I'm positive I'm using the wrong terminology in trying to explain what I am trying to do, and that is likely the reason why google was not my friend.

I'm using SQL to calculate an MD5 checksum, and it returns a 16-byte hex value. I would like to convert that into a 32-byte character value that "splits" the hex half-bytes to characters. E.g.:

As I recall, it's not difficult to do in MI, but I don't have any examples handy.

In ILE RPG, one crude method would be to do something like this for each byte:

with HEXDIGITS defined CONST('0123456789ABCDEF')

EVAL %SUBST(CONTHEX:1:1) =
%SUBST(HEXDIGITS:%DIV(INTNUM:16) + 1: 1)
EVAL %SUBST(CONTHEX:2:1) =
%SUBST(HEXDIGITS:%REM(INTNUM:16) + 1: 1)

--
JHHL

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.