|
Rich, Try this for convert to hex. H Bnddir('QC2LE') DftActGrp(*No) D cvthc Pr Extproc('cvthc') D receiver * Value D source * Value D size 10i 0 Value D Inputchar S 20a Inz('Convert this to hex') D OutputHex S 40a C CallP cvthc(%Addr(OutputHex):%Addr(InputChar): C %Len(OutputHex)) C InputChar Dsply C OutputHex Dsply C Eval *InLR = *On Try this from convert from hex. H Bnddir('QC2LE') DftActGrp(*No) D cvtch Pr Extproc('cvtch') D receiver * Value D source * Value D size 10i 0 Value D InputHex S 20a Inz('C1C2C3C4C5C6C7C8C9A1') D OutputChar S 10a C CallP cvtch(%Addr(OutputChar):%Addr(InputHex): C %Len(OutputChar)) C Eval *InLR = *On Cheer, Peter -----Original Message----- From: M. Lazarus [mailto:mlazarus@ttec.com] Sent: Sunday, September 09, 2001 3:15 PM To: rpg400-l@midrange.com Subject: Re: Your favorite hex conversion routine - ILE Rich, At 9/7/01 12:19 PM -0500, you wrote: >If you have a favorite 'convert to hex string' routine, or perhaps there is >a nice bif already, please let me know about it. I think that there is a C routine call ctoh (Character to Hex). -mark _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l. This communication is confidential and may be legally privileged. If it is not addressed to you, you are on notice of its status. Please immediately contact us at our cost and destroy it. Please do not use, disclose, copy, distribute or retain any of it without our authority - to do so could be a breach of confidence. Thank you for your co-operation. Please contact us on (09) 356 5800 if you need assistance.
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.