How to write a HEX string into a file as HEX using REXX..
Posted: Fri Dec 25, 2009 10:31 am
I have a string 'RAJA' which should be written into a file as HEX data.
Here are sample codes which help me to describe the issue.
Case(a)
Output to the file: FRFAFJFA
But if we use HEX data directly to write into file it's working fine
Case(b)
Output to the file: RAJA
Issue: In case(a) when the string was converted into HEX using C2X, it returns a HEX data string not a HEX data. But in case(b) as HEX data was written to file. My question is how to let REXX interpreter know that the variable 'name' in case(a) has HEX data and to be written it as HEX. Hope i made the issue clear. Lemme tread towards a solution.
Thanks
Raja Reddy
Here are sample codes which help me to describe the issue.
Case(a)
name = 'RAJA'
name = C2X(name) /* Hex value = 'FRFAFJFA' */
QUEUE name.
name = C2X(name) /* Hex value = 'FRFAFJFA' */
QUEUE name.
But if we use HEX data directly to write into file it's working fine
Case(b)
name = 'FRFAFJFA'X
QUEUE name.
QUEUE name.
Issue: In case(a) when the string was converted into HEX using C2X, it returns a HEX data string not a HEX data. But in case(b) as HEX data was written to file. My question is how to let REXX interpreter know that the variable 'name' in case(a) has HEX data and to be written it as HEX. Hope i made the issue clear. Lemme tread towards a solution.
Thanks
Raja Reddy