|
I'm trying to convert a numeric value to a binary value and I stress the
word trying. I'm using the itoa function to try this. First can anyone
tell me if this is possible? Second can anyone tell me where I could
find some good information on the itoa function as it relates to RPGIV?
Finally does anyone have any suggestion, tips, secrets, or anything in regards to converting numeric values to binary values?
D binVal S 10I 0 D packedVal S 10 0 INZ(1234) D zonedVal S 10S 0 INZ(9876)
C EVAL binVal = packedVal C EVAL binVal = zonedVal C EVAL binVal = -1234 C EVAL binVal = %SIZE(packedVal) C EVAL binVal = %ELEM(some-array) C EVAL binVal = %DECPOS(packedVal)
Regards, Simon Coulter. -------------------------------------------------------------------- FlyByNight Software AS/400 Technical Specialists
http://www.flybynight.com.au/ Phone: +61 3 9419 0175 Mobile: +61 0411 091 400 /"\ Fax: +61 3 9419 0175 \ / X ASCII Ribbon campaign against HTML E-Mail / \ --------------------------------------------------------------------
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.