What I found was that I had some columns that were NULL. I was putting them into a hash file and reading them back out.
OracleOCI8 -> Transformer -> hash -> Transformer -> sequential file
I would get errors writing to the sequential file. I would NOT get these errors if I just wrote the input data into a flat file:
OracleOCIi -> Transformer -> Sequential File
What I ended up doing was putting a space into the null fields as I was writing them into the hash file. This eliminated the NLS mapping error writing to the sequential file.
Ray,
F.Y.I. This is the exact problem that you and I talked about a couple of weeks ago and this was my solution.
Good Luck,
Tony
nls_put_fixedwidth() - NLS mapping error
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 483
- Joined: Thu Jun 12, 2003 4:47 pm
- Location: St. Louis, Missouri USA
-
- Premium Member
- Posts: 483
- Joined: Thu Jun 12, 2003 4:47 pm
- Location: St. Louis, Missouri USA
Can you see what the '?' chars are? I did a hex dump and saw that they were char(25) (hex 19). I never did figure out where the char(25) was coming from. Those columns were empty in the input flat file. I handled it something like this:
In the column derivation I had a transform NullToSpace
NullToSpace(LinkName.ColumnName)
NullToSpace looked something like this:
If EmptyToNullR(%Value%) = Char(25) Then " " Else If IsNull(EmptyToNullR(%Value%)) Then " " Else %Value%
Where Value is the argument I defined to the Transform and EmptyToNullR() is a routine I wrote that trims leading and trailing spaces from a value then if the resulting value is empty string, makes it null.
Hope this helps,
Tony
In the column derivation I had a transform NullToSpace
NullToSpace(LinkName.ColumnName)
NullToSpace looked something like this:
If EmptyToNullR(%Value%) = Char(25) Then " " Else If IsNull(EmptyToNullR(%Value%)) Then " " Else %Value%
Where Value is the argument I defined to the Transform and EmptyToNullR() is a routine I wrote that trims leading and trailing spaces from a value then if the resulting value is empty string, makes it null.
Hope this helps,
Tony