'Line Feed' that doesn't disappear
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 298
- Joined: Tue Aug 26, 2008 12:17 pm
'Line Feed' that doesn't disappear
Hello friends.
I have a problem.
I am generating a Sequential File through DataStage and there is a column that always shows a strange character at its beginning like that 'char(10)', in other words, that little rectangle which means the 'Line Feed'.
It causes the file truncation.
We have already tried to use the Convert function to substitute the char(10) to '', or the char(13) to '' and other ascii codes, but it didn't work.
The funny thing is that, independent on the column derivation, ex: derivation = 'a' or derivation = Link.COLUMN, always this character appears.
It is not shown at the DataStage File view, I just can see it if I open the file at the Notepad or at the Unix terminal.
Looking through DataStage, the file is apparently ok.
If I change the columns order at the file, the strange character still appears, at the new column position and at the beginning of the column.
So strange.
"Independent on its derivation".
What can it be?
Thanks anyway, guys.....
I have a problem.
I am generating a Sequential File through DataStage and there is a column that always shows a strange character at its beginning like that 'char(10)', in other words, that little rectangle which means the 'Line Feed'.
It causes the file truncation.
We have already tried to use the Convert function to substitute the char(10) to '', or the char(13) to '' and other ascii codes, but it didn't work.
The funny thing is that, independent on the column derivation, ex: derivation = 'a' or derivation = Link.COLUMN, always this character appears.
It is not shown at the DataStage File view, I just can see it if I open the file at the Notepad or at the Unix terminal.
Looking through DataStage, the file is apparently ok.
If I change the columns order at the file, the strange character still appears, at the new column position and at the beginning of the column.
So strange.
"Independent on its derivation".
What can it be?
Thanks anyway, guys.....
Joyce A. Recacho
São Paulo/SP
Brazil
São Paulo/SP
Brazil
What are your sequential file settings?
Also, since you are on unix, do an "od -x <file>" to see what the ascii code of the character in question really is, it might be an 0x00
Also, since you are on unix, do an "od -x <file>" to see what the ascii code of the character in question really is, it might be an 0x00
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 298
- Joined: Tue Aug 26, 2008 12:17 pm
First of all, thank you for the answer.
What do you mean by: see if the ascii code is 0x00 ? What '0x00' means?
Here we are using the APT_STRING_PADCHAR environment variable set like 0x20, but actually I don't know exactly what it means.
Thankss!
What do you mean by: see if the ascii code is 0x00 ? What '0x00' means?
Here we are using the APT_STRING_PADCHAR environment variable set like 0x20, but actually I don't know exactly what it means.
Thankss!
Last edited by joycerecacho on Tue Jan 08, 2013 10:55 am, edited 1 time in total.
Joyce A. Recacho
São Paulo/SP
Brazil
São Paulo/SP
Brazil
-
- Participant
- Posts: 298
- Joined: Tue Aug 26, 2008 12:17 pm
Here we are using the APT_STRING_PADCHAR environment variable set like 0x20, but actually I don't know exactly what it means.joycerecacho wrote:First of all, thank you for the answer.
What do you mean by: see if the ascii code is 0x00 ? What '0x00' means?
Here we are using the APT_STRING_PADCHAR environment variable set like 0x20, but actually I don't know exactly what it means.
Thankss!
Thankss!
Joyce A. Recacho
São Paulo/SP
Brazil
São Paulo/SP
Brazil
-
- Participant
- Posts: 298
- Joined: Tue Aug 26, 2008 12:17 pm
I identified that the characters are: Null + Vertical Tab (ascii 11)chulett wrote:As noted, you really need to identify the character in question, its specific value. Only then will you be able to deal with it properly. ...
But the convert function didn't work.
The APT_STRING_PADCHAR could cause this?
Configured as 0x20.
Thanks..
Joyce A. Recacho
São Paulo/SP
Brazil
São Paulo/SP
Brazil
-
- Premium Member
- Posts: 62
- Joined: Tue Dec 07, 2004 7:41 am
- Location: Brasil
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
0x20 is a shorthand way to specify the hexadecimal number 20, which is the same as 32 using a decimal base.
The character whose ASCII code is 32 (in decimal) or 20 (in hexadecimal) is the space character (" ").
If your data contains Vertical Tab characters use Convert() function to remove them. As you note, these are represented as Char(11).
Tip: initialize stage variable svVerticalTab to Char(11) so that the Char() function only has to be executed once.
Similarly the ASCII NUL character can be represented as Char(0).
The character whose ASCII code is 32 (in decimal) or 20 (in hexadecimal) is the space character (" ").
If your data contains Vertical Tab characters use Convert() function to remove them. As you note, these are represented as Char(11).
Tip: initialize stage variable svVerticalTab to Char(11) so that the Char() function only has to be executed once.
Similarly the ASCII NUL character can be represented as Char(0).
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.
-
- Participant
- Posts: 298
- Joined: Tue Aug 26, 2008 12:17 pm
Hi Ray!
I took out this environment variable to test, and the problem still happens.
I also created the stage variable as Char(22) - the exact lenght of its content and it didnt work again. - I started it with ascii char(11).
In another job wich this problem used to happen, I changed the field definition, from varchar() to char(22) - the exact lenght of the content, and it worked. I don't know why in this other job, a similar one, this strategic fails.
Let's keep on trying.
Thanks anyway, friends.
I took out this environment variable to test, and the problem still happens.
I also created the stage variable as Char(22) - the exact lenght of its content and it didnt work again. - I started it with ascii char(11).
In another job wich this problem used to happen, I changed the field definition, from varchar() to char(22) - the exact lenght of the content, and it worked. I don't know why in this other job, a similar one, this strategic fails.
Let's keep on trying.
Thanks anyway, friends.
Joyce A. Recacho
São Paulo/SP
Brazil
São Paulo/SP
Brazil
Convert(Char(11):Char(0),'',In.Column) should work to remove those 2.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 298
- Joined: Tue Aug 26, 2008 12:17 pm
Hi guys.
For my surprise, in another Transformer, I created a VarChar field and in its derivation I wrote the same content and that special caracter didnt appear any more.
I really couldn't understand. I just created the Field in another transformer, with the same derivation.
Is it a Bug?
I can't explain.
Thanks for your help, guys!!!!!
For my surprise, in another Transformer, I created a VarChar field and in its derivation I wrote the same content and that special caracter didnt appear any more.
I really couldn't understand. I just created the Field in another transformer, with the same derivation.
Is it a Bug?
I can't explain.
Thanks for your help, guys!!!!!
Last edited by joycerecacho on Mon Jan 14, 2013 1:40 pm, edited 1 time in total.
Joyce A. Recacho
São Paulo/SP
Brazil
São Paulo/SP
Brazil