|
Is there a reason cvtch and cvthc are not a choice here? They work fast, are MI instructions and can be called from RPG IV very easily. See my article on it at: http://www.mcpressonline.com/mc?1@xxxxxxxxxxxxxxxx@.6b27ccf2 -Bob Cozzi www.RPGxTools.com RPG xTools - Enjoy programming again. -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of HauserSSS Sent: Wednesday, November 09, 2005 12:02 AM To: RPG programming on the AS400 / iSeries Subject: AW: Hex to char. No, it won't work, because CAST only converts between different data types. All values in datatypes are stored in a hexa decimal representation. There is a scalar function HEX() to get the hexa decimal representation of a value, but not the inverse. Birgitta -----Ursprüngliche Nachricht----- Von: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]Im Auftrag von Glenn Gundermann Gesendet: Mittwoch, 9. November 2005 02:23 An: RPG programming on the AS400 / iSeries Betreff: Re: Hex to char. Would the SQL CAST work? Glenn Gundermann Gauri Kulkarni writes: > Hi, > > I am having an input file which contains data in Hexadecimal character > format. > My program should convert this Hex data to Char and writes to another output > file. > Am free to use either RPG/RPGILE. > Is there is function/prcedure which will help to convert from Hex to Char ? > > Regards, > Gauri
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.