null replaced by "^"

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

sunitha_cts
Participant
Posts: 98
Joined: Thu Feb 05, 2009 1:14 am
Location: visakhapatnam
Contact:

null replaced by "^"

Post 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
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
nagarjuna
Premium Member
Premium Member
Posts: 533
Joined: Fri Jun 27, 2008 9:11 pm
Location: Chicago

Post by nagarjuna »

How you moved the file from AS/400 to unix box ? If its ftp then which mode are you using ??
Nag
sunitha_cts
Participant
Posts: 98
Joined: Thu Feb 05, 2009 1:14 am
Location: visakhapatnam
Contact:

Post by sunitha_cts »

i moved my file s from as/400 to unix by using ascript
sunitha_cts
Participant
Posts: 98
Joined: Thu Feb 05, 2009 1:14 am
Location: visakhapatnam
Contact:

Post 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.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Look again, the character after the carat is always an uppercase O in the sample you provided.
sunitha_cts
Participant
Posts: 98
Joined: Thu Feb 05, 2009 1:14 am
Location: visakhapatnam
Contact:

Post by sunitha_cts »

I am using datastage server
sunitha_cts
Participant
Posts: 98
Joined: Thu Feb 05, 2009 1:14 am
Location: visakhapatnam
Contact:

Post 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?
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

It appears to be ^0, null value in bin.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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
sunitha_cts
Participant
Posts: 98
Joined: Thu Feb 05, 2009 1:14 am
Location: visakhapatnam
Contact:

Post 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
sunitha_cts
Participant
Posts: 98
Joined: Thu Feb 05, 2009 1:14 am
Location: visakhapatnam
Contact:

Post by sunitha_cts »

Hi,

I am not a not a Premium member so not able to see the whole message.
Thanks
sunitha
MURALI123
Participant
Posts: 46
Joined: Sun Jun 21, 2009 1:37 am
Location: CHENNAI

Post by MURALI123 »

Hi,
have you checked both both AS400 System and unix server are
the same transfer ASCII.

Thanks,
Malli
Post Reply