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..
Carriage Returns...
Moderators: chulett, rschirm, roy
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.
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.
Nick.