Page 1 of 1
How to take care of a Blank line at the end of a flat file
Posted: Fri May 13, 2005 11:57 am
by bapajju
I have a job that reads from a CSV file. The problem is that this file has a blank line at the end of the file. Please let me know how to take care of this.
Thanks in advance
Posted: Fri May 13, 2005 12:45 pm
by alhamilton
I would try to remove the line using shell commands before the DataStage job starts. If it truly is blank, then "grep "," should discard the line. Since it is a csv file all other lines would be output.
Posted: Fri May 13, 2005 2:42 pm
by Sainath.Srinivasan
You can include a constraint in the job. This is just in case you do not have this in the future.
Alternatively you can use OS commands to perform the same.