Hi,
I have a flat file with hexidecimal characters after certain characters. For Example : "MY NAME IS BEN ~
0A"
The "0A" represents the hex for 10 (decimal) whitch means 10 spaces. My problem is when i have "0A" in a alpha numeric workfield (length 2), how can i use it as a hex value? In other words i need to change it to X'0A' in a alpha numeric field length 1 or to 10 in a decimal field.
Hardcode will look something like this:
D IntDS ds
D IntNum 5i 0 inz(0)
D IntChar 1a Overlay(IntNum:2)
c move X'0A' IntChar
Now IntNum will contain the value 10.
Now all i have is a workfield with the character value "0A". How do i get to 10?
Software/Hardware used:
ASKED:
April 29, 2009 3:36 PM
UPDATED:
April 30, 2009 1:02 PM
Thanks Phil,
It works perfect.
All day yesterday I was trying this exact same example but was constantly getting a Domain error.
For future reference I think I was doing something wrong with the length of my work fields.
Thanks again,
Stefan