File Reading
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 5
- Joined: Fri Feb 22, 2008 9:36 am
File Reading
I have trouble reading a simple text file that the first line contain blanks but the subsequent rows (line) have records. How do I tell Datastage to ignore the first blank line? I tried to check the box for first line is column names in the format tab of the output which I thought by checking the box it would ignore the first line but I got the error saying read_delimited() row 1 column X , required column missing..Any suggestions or help would be much appreciated.
-
- Charter Member
- Posts: 299
- Joined: Wed Nov 13, 2002 5:38 pm
- Location: USA
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
That was not a part of your original specification!
Why not write a little routine to pre-process the file, to remove all the totally blank lines? This can be executed, for example, as a before-job subroutine, and the job reads its result (a different, but associated, file name).
Why not write a little routine to pre-process the file, to remove all the totally blank lines? This can be executed, for example, as a before-job subroutine, and the job reads its result (a different, but associated, file name).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Charter Member
- Posts: 299
- Joined: Wed Nov 13, 2002 5:38 pm
- Location: USA
I think the OP wong_ricky said that checking the checkbox saying the first line is column headers requires that the first line still be formatted correctly. That is, contain the right number of delimiters. I assume that is correct. Is it? A blank line isn't formatted according to the file schema. Sachin I think highjacked the post and so don't need no stinkin' specifications. You're on your own for Windows functionality.
Yes, that is correct.throbinson wrote:I think the OP wong_ricky said that checking the checkbox saying the first line is column headers requires that the first line still be formatted correctly. That is, contain the right number of delimiters. I assume that is correct. Is it? A blank line isn't formatted according to the file schema.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers