Page 1 of 2

null replaced by "^"

Posted: Thu Jul 02, 2009 5:32 am
by sunitha_cts
Hi,

1.my file in as/400 is moved into unix box,
2.we could see the records from unix box into datastage and read in this manner
3.,we checked in source file but in place of null values ^ is present.

32001 CMP^O0010301^O^O0153


after CMP it is null and should keep 9 characters but it is redaing the next record .Ihad taken csv file with fixed width.When i am checking in csv view data i could see"^" in place of null.
4.When i opened as/400 file and saw the meatdat it fine.after moving it to
unix box and reading that file they is a problem.


So finally i require null characters in my view data in place of "^"

Thanks
sunitha

Posted: Thu Jul 02, 2009 5:40 am
by ArndW
You are seeing a "^O" displayed. I don't know which tool you are using, but it could be ASCII 15. The value has probably been introduced during the move from the AS400 system.

Posted: Thu Jul 02, 2009 6:09 am
by nagarjuna
How you moved the file from AS/400 to unix box ? If its ftp then which mode are you using ??

Posted: Thu Jul 02, 2009 7:44 am
by sunitha_cts
i moved my file s from as/400 to unix by using ascript

Posted: Thu Jul 02, 2009 7:45 am
by sunitha_cts
i moved my file s from as/400 to unix by using ascript and it is not "^0" ,is is only "^" ,here 0 is a record.

Posted: Thu Jul 02, 2009 7:55 am
by ArndW
Look again, the character after the carat is always an uppercase O in the sample you provided.

Posted: Thu Jul 02, 2009 8:00 am
by sunitha_cts
I am using datastage server

Posted: Thu Jul 02, 2009 8:11 am
by sunitha_cts
I moved files through ftp with ASCII as the transfer type and the files are fixed width in the source system. How to handle these control characters in the output so that I am able to process the data further using DataStage?

Posted: Thu Jul 02, 2009 8:24 am
by ArndW
The FTP program has done an EBCDIC to ASCII conversion (usually not a problem unless you have packed decimal fields). The EBCDIC Null maps to ASCII null so that isn't your issue.

Use "cat -v {yourfile}" to find out which characters you really have.

Posted: Thu Jul 02, 2009 8:28 am
by Sainath.Srinivasan
It appears to be ^0, null value in bin.

Posted: Thu Jul 02, 2009 8:33 am
by chulett
No, what is posted in an "upcaret-oh" as in "^" followed by the letter O... note the difference in the zeroes posted next to them. And also note this is one character not two.

Posted: Thu Jul 02, 2009 8:34 am
by ArndW
Sainath - I assume the OP did a "cut-and-paste" in the original post, and there it is written with a capital O; I had the same original thought about the ^0. This is also why I want to get the "real" values, either with the grep -v command or with od -x

Posted: Thu Jul 02, 2009 10:42 pm
by sunitha_cts
Hi,



32001 CMP^O0010301^O^O0153 here in place upcaret 9 null charcters should be placed but Ds is reading it as
32001 CMP(HERE NINE NULL CHARACTERS SHOULD BE PLACED in tenth positon
BUT IT IS READING AS"^"AND TAKING THE NEXT RECORD Into "zero" in the 11th position .
Thanks
sunitha

Posted: Thu Jul 02, 2009 10:43 pm
by sunitha_cts
Hi,

I am not a not a Premium member so not able to see the whole message.
Thanks
sunitha

Posted: Thu Jul 02, 2009 10:55 pm
by MURALI123
Hi,
have you checked both both AS400 System and unix server are
the same transfer ASCII.

Thanks,
Malli