Carriage Returns...

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

Post Reply
meena
Participant
Posts: 430
Joined: Tue Sep 13, 2005 12:17 pm

Carriage Returns...

Post by meena »

Hi All,
We are loading data from a DOS files to many different tables. The job runs fine but the problem is when we see the data from SQL Plus we are getting "Carriage Returns" into the Column where we are pointing the last field from the file. We have many jobs which are loading the data into different tables. But we are not facing this problem with every table, it's with only few tables...
We are getting the files in DOS format and we are moving them to UNIX server.
How can we come out of this "Carriage return" problem. I am not able to handle it on DataStage. Can we handle this in DataStage.....I know that we can actually write a UNIX script to get rid of "Carriage Returns" but I like to do it in DataStage..
Aruna Evoori
nick.bond
Charter Member
Charter Member
Posts: 230
Joined: Thu Jan 15, 2004 12:00 pm
Location: London

Post by nick.bond »

2 things to try

1) When you ftp the files from DOS to UNIX make sure you are doing it in Ascii mode (not binary), that should be sufficient for the FTP process to convert the CR/LF.

2) If you can't do the above or still have the CR/LF on the end of each line you can tell DS that the file is in DOS mode. On the sequential file 'Stage' tab there are options for line termination. Choose CR/LF.

I put them in that order because I think that if you are running on a UNIX environment the files should be stored in UNIX format, not DOS, but if you can't change the way the files are sent then you can tell datastage the files are not in that format.
Regards,

Nick.
meena
Participant
Posts: 430
Joined: Tue Sep 13, 2005 12:17 pm

Post by meena »

Hi Nick,
We are FTP'ing the files in the ASCII mode & In Stage tab of sequential file we used Line Termination to DOS Style..
Aruna Evoori
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

If you are indeed ftp'ing in Ascii format then the files get converted to Unix format. That means you need to specify 'Unix Format' in the sequential file stage.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply