I am receiving fixed width files.
I would like to determine when a column value is null.
On the sequential file stage - outputs - format screen there is a field called "default null string".
Can someone explain how this is supposed to be used? My assumption was that if I put a value there and an incoming field has that value Ascential would treat it like a null. Is this correct?
I put in a value like "*" and I get the following error when I compile.
External null string '*' (1 bytes) is too wide for column c1 (0 bytes).
Which makes no sense.
fixed width columns and the default null string
Moderators: chulett, rschirm, roy
Re: fixed width columns and the default null string
When you are reading the fixed width file and want to determine if the column value is null, then trim(link.column) and check for the empty string in the transformer.hiltsmi wrote:I am receiving fixed width files.
I would like to determine when a column value is null.
On the sequential file stage - outputs - format screen there is a field called "default null string".
Can someone explain how this is supposed to be used? My assumption was that if I put a value there and an incoming field has that value Ascential would treat it like a null. Is this correct?
I put in a value like "*" and I get the following error when I compile.
External null string '*' (1 bytes) is too wide for column c1 (0 bytes).
Which makes no sense.
Code: Select all
trim(link.column)=''
Kris~
~Kris
Thats true.hiltsmi wrote:In this case an empty string and NULL are not the same thing. An empty string indicates no data was entered into the field but null indicates the data is unknown.
Depending where the data is(database, files) and where we are checking, both empty string and NULL are different.
Kris~
~Kris
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Because you're using fixed width, the representation of NULL will differ in different columns (since it has to be the same width as the column). In the Columns grid you can specify column-specific representations of NULL; scroll right until you find it.
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.