How to avoid NULL to reject - in SWITCH case
Moderators: chulett, rschirm, roy
How to avoid NULL to reject - in SWITCH case
Hi all,
In input stage i have a column STATUS which cant have Y or N or null. I used switch to seperate to two pipeline. null should go to N link. Bul i can handle null value to flow to a stream, it goes to Reject link. I tried with '' , "", @NUL, @NULL.STR , NULL but doesent work. But i can make it up with transformer stage with "". STATUS is Varchar with 1 byte length. Can any one help me out.
Thanx in advance
-kumar
In input stage i have a column STATUS which cant have Y or N or null. I used switch to seperate to two pipeline. null should go to N link. Bul i can handle null value to flow to a stream, it goes to Reject link. I tried with '' , "", @NUL, @NULL.STR , NULL but doesent work. But i can make it up with transformer stage with "". STATUS is Varchar with 1 byte length. Can any one help me out.
Thanx in advance
-kumar
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
@NULL and @NULL.STR are DataStage BASIC system variables and therefore inappropriate in parallel jobs.
What kind of "input stage" are you using? For example, the Reject link from a Sequential File stage only handles rows that do not match the schema associated with the input link.
You need to follow up with some method of handing the null, perhaps a Modify stage to convert same to 'N', and only then direct rows according to the value in STATUS, perhaps with a Switch stage. Or do both operations in a Transformer stage.
What kind of "input stage" are you using? For example, the Reject link from a Sequential File stage only handles rows that do not match the schema associated with the input link.
You need to follow up with some method of handing the null, perhaps a Modify stage to convert same to 'N', and only then direct rows according to the value in STATUS, perhaps with a Switch stage. Or do both operations in a Transformer stage.
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: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 49
- Joined: Fri Nov 11, 2005 10:19 am
-
- Participant
- Posts: 49
- Joined: Fri Nov 11, 2005 10:19 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 49
- Joined: Fri Nov 11, 2005 10:19 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Have you reported this apparent bug through your support provider?
Is any of you who are experiencing this symptom running parallel jobs on a Windows platform? I note that the OP is on UNIX. If on UNIX, can you please post what kind of UNIX (for example AIX, HP-UX, Solaris, etc.)?
Is any of you who are experiencing this symptom running parallel jobs on a Windows platform? I note that the OP is on UNIX. If on UNIX, can you please post what kind of UNIX (for example AIX, HP-UX, Solaris, etc.)?
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: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
ANY data type can hold null, provided that the column is defined as nullable (that is, not defined as NOT NULL).
Null (unknown value) is not the same as "" (empty string, or zero-length string, which is a known value). You can not put "" into any kind of numeric column.
Null (unknown value) is not the same as "" (empty string, or zero-length string, which is a known value). You can not put "" into any kind of numeric column.
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.