Binary null in the last column of the Sequential file
Moderators: chulett, rschirm, roy
Binary null in the last column of the Sequential file
Hi,
We are trying to write to a Sequential file stage and then read from the same file in the same job.
When we write to the file, its has a single column which contains the complete row. And when we read that file, we read with 50 columns by providing a delimiter character. But when we read the file, we get an additional binary null value at the end of the row. We tried changing the Line Termination from UNIX style to DOS style. But not able to resolve this.
Please suggest how could we eliminate this binary null at the end. I transferred and looked at the file from notepad. It looked perfect. Any suggestions...
Thanks.
We are trying to write to a Sequential file stage and then read from the same file in the same job.
When we write to the file, its has a single column which contains the complete row. And when we read that file, we read with 50 columns by providing a delimiter character. But when we read the file, we get an additional binary null value at the end of the row. We tried changing the Line Termination from UNIX style to DOS style. But not able to resolve this.
Please suggest how could we eliminate this binary null at the end. I transferred and looked at the file from notepad. It looked perfect. Any suggestions...
Thanks.
First you need to determine how that null gets there. When you write the file, what termination and attributes are you using and are they the same as when you read the file?
hint: If you don't know this already - you can greatly improve throughput if you make this file a fifo one
hint: If you don't know this already - you can greatly improve throughput if you make this file a fifo one
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 467
- Joined: Tue Mar 20, 2007 6:36 am
- Location: Chennai
- Contact:
Looking at it in Notepad won't help you much...
Check the contents of the file in a Hex editor. Compare your first input file and the file you are generating at the end (which has the Null character at the end). Do you see a difference?, If you do, then you are inserting the NULL in your job. If not you need to backtrack and see where you are getting this NULL from.
Check the contents of the file in a Hex editor. Compare your first input file and the file you are generating at the end (which has the Null character at the end). Do you see a difference?, If you do, then you are inserting the NULL in your job. If not you need to backtrack and see where you are getting this NULL from.
Minhajuddin
<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
vnspn - are you working with VarChar() or Char() columns? The 0x00 should not be present in the file. How are you determining that it is present?
Dsnew - there is a little tick box for named pipes in the sequential file stage.
Dsnew - there is a little tick box for named pipes in the sequential file stage.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
With fixed length fields, how does a 0x00 end up in the last column? What tool are you using to determine this ("View Data" can't show nulls, so it must be some other tool)
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
When we give fixed length and say view data, we get error message and it does not show up any data.
The error message that we get is - "column unexpectedly ended by EOR"
Yes, we are seeing it using view data only. At the last column value, after the actual string value, it shows a thick line like , " | "
The error message that we get is - "column unexpectedly ended by EOR"
Yes, we are seeing it using view data only. At the last column value, after the actual string value, it shows a thick line like , " | "
-
- Premium Member
- Posts: 614
- Joined: Fri Feb 06, 2004 3:59 pm
-
- Premium Member
- Posts: 614
- Joined: Fri Feb 06, 2004 3:59 pm