×
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.
Hi
You could roll your own convert to hex routine.
A long time ago I coded a hex converter in RPG III.
This following is a port to RPG ILE
I havent run this code snippet I copied it from another program I posted
in the wiki.
But the general idea is to calculate the index to the hex character in
the CRS array by turning low order bits off then high order bits off.
It converts the 1 byte FLD to hex in the string RU.
D DS
D BIN 1 2B 0
D HX1 2 2
D HX2 1 2
D RU S 255 varying
D FLD S 1
D X0F C X'0F'
D XF0 C X'F0'
D Z S 5 0
D CRS S 1 DIM(16) CTDATA PERRCD(16)
BIN = 0;
HX1 = FLD;
HX1 = %BITAND(HX1 : XF0);
Z = BIN / 16 + 1;
RU = RU + CRS(Z);
BIN = 0;
HX1 = FLD;
HX1 = %BITAND(HX1 : X0F);
Z = BIN + 1;
RU = RU + CRS(Z);
**
0123456789ABCDEF
Regards
Frank
On 26/11/2019 8:24 am, Rishi Seth wrote:
Hi,
Just realized i had put + sign incorrectly at this statement in my program
which i shared in previous email link.
1. callp ToHex(HexEquivalent:+
2. KEY: %len(KEY)*2);
after removing it though it got compiled successfully but when trying to
run giving error
-- 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.