how to find the data is EBDIC or ASCII

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
boppanakrishna
Participant
Posts: 106
Joined: Thu Jul 27, 2006 10:05 pm
Location: Mumbai

how to find the data is EBDIC or ASCII

Post by boppanakrishna »

hi all,
How to know whether my source data is ASCII or EBDIC ..is there method for knowing the same, i am using IBM DB2 i series as source and moving into the p-series

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

Post by ray.wurlod »

If it makes sense when you view it in DataStage without any transformation then it's ASCII.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
gsherry1
Charter Member
Charter Member
Posts: 173
Joined: Fri Jun 17, 2005 8:31 am
Location: Canada

Post by gsherry1 »

Ray's answer applies most of the time.

I prefer to use external tools to DataStage to do this check, rather than the overhead of setting up a test in DataStage. First, I need to know something about the content of the data before you can determine if it is in EBCDIC of ASCII. ei. If you know the first few bytes are suppose to be displayable numeric values then you can use a hex viewer external to the DataStage product to check what byte values are present (od -x <file). If you see 0xF1 - 0xF9 for first few bytes, then it's EBCDIC (or an ASCII file with meaningless junk)

It's probably worth your while as an ETL programmer to read up what common datatypes in EBCDIC or ASCII look like in hex format.

- Greg
Post Reply