Page 1 of 1

Special characters

Posted: Thu Nov 29, 2007 12:40 pm
by landaghaar
Hello,
I am reading cobol files. i noticed recently that some character fields are modified.
data reads like this in cobol:

ID, CMT, DATE
11, OK!, 2007-12-12
12,Done,2007-12-12
...


When I read this from data stage parallel job, i get this:

ID, CMT, DATE
11, OK], 2007-12-12
12,Done,2007-12-12
...


! changes to ] but this is not all, after noticing this, I changed the ! to ] in source file and tried to view it, everything after ] was chopped off.

How can you read [, ] or ! or possibly more specially characters correctly?

Posted: Thu Nov 29, 2007 2:25 pm
by ray.wurlod
Observation: COBOL files don't usually have delimiters.

Are you translating from EBCDIC to ASCII as part of your processing?

Posted: Thu Nov 29, 2007 7:39 pm
by rexsmith
Try reading the varchar as nvarchar. when you read it in ASCII it should show up as Pipe |

Posted: Fri Nov 30, 2007 11:09 am
by landaghaar
ray.wurlod wrote:Observation: COBOL files don't usually have delimiters.

Are you translating from EBCDIC to ASCII as part of your processing? ...
the delimiter i just put for readability. i just wanted to demonstrate the three columns.

i am reading from cobol and want to write to a sequencial file in ascii format. but it seems it has problem reading ! and [ and ] characters.

I called IBM, and sounds like a bug which needs patches, there are patches for other versions but not for 7.5.2