I have define a fields to be char(2), and use it to store data generated from mainframe.
The data looks like this (in hex representation) : \x0001
Is it possible to extract the content '0001' to another string?
Any hint?
Working with HEX data
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Explore the Iconv function with conversion codes like "MX0C" and "MY" in the on-line help. Select the one that is most likely to suit your needs.
Because you specify \x0001 is being loaded into CHAR(2), I'm assuming you're using ASCII or some other single-byte character set.
Beware of two problems.
Because you specify \x0001 is being loaded into CHAR(2), I'm assuming you're using ASCII or some other single-byte character set.
Beware of two problems.
- \x00 is NUL which is a string terminator character. This would not load anything into the first character position - the result of loading \x0001 would be a one-character string containing \x01.
\x01 through \x1F are non-printing characters.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Iconv() and its partner function Oconv() are primarily for server jobs.
You posted your query in what it intended to be the server jobs forum; I know you are aware of the parallel jobs forum because you also post there.
These BASIC functions are available in PX (parallel jobs) but only in limited circumstances - though there are more opportunities to use BASIC expressions for control in version 7.5 parallel jobs.
You posted your query in what it intended to be the server jobs forum; I know you are aware of the parallel jobs forum because you also post there.
These BASIC functions are available in PX (parallel jobs) but only in limited circumstances - though there are more opportunities to use BASIC expressions for control in version 7.5 parallel jobs.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.