Reading Hexadecimal Data using CFF stage

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
anand_dafaria
Premium Member
Premium Member
Posts: 36
Joined: Wed Dec 27, 2006 3:50 am
Location: Phoenix

Reading Hexadecimal Data using CFF stage

Post by anand_dafaria »

Hi,
We are reading Binary files using CFF stage. One attribute is having Hexadecimal data in it with PIC X as its datatype in the copybook. We are able to read the entire file but the data of the above said attribute is coming as square characters when we view the data. :?

Is there any way that we can read the Hexadecimal data in correct form using CFF stage or any workaround to read the attribute having hexadecimal value in it??

Any help would be highly appreciated.

Thanks
Anand
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Ignore what View Data is showing you. Characters 0x00 through 0x0F can be represented by PIC X. These are not printable characters. What did you expect to get?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
anand_dafaria
Premium Member
Premium Member
Posts: 36
Joined: Wed Dec 27, 2006 3:50 am
Location: Phoenix

Post by anand_dafaria »

Hi Ray,
Thanks for you reply.

The value for one field defined as PIC X; on the mainframe side it is hexadecimal value coming as below:

##########################
<blank>
<blank>
a
j
e
f
##########################

The records like a,j,e,f are getting correctly read from the mainframe side but the <bank> characters are getting converted to some square characters. But when we actually on the mainframe side after putting the HEX ON these blank characters are actually some hexadecimal values like 81,91,61 etc.

So how these values can be fetched in Datastage. Any idea would be higly appreciated.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I'd prefer to use one of the lookup functions in a Modify stage, for example lookup_int16_from_string().
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply