nls_put_fixedwidth() - NLS mapping error

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
tonystark622
Premium Member
Premium Member
Posts: 483
Joined: Thu Jun 12, 2003 4:47 pm
Location: St. Louis, Missouri USA

Post by tonystark622 »

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
tonystark622
Premium Member
Premium Member
Posts: 483
Joined: Thu Jun 12, 2003 4:47 pm
Location: St. Louis, Missouri USA

Post by tonystark622 »

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
Post Reply