Warnings for Null Values

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
shwetha.st
Participant
Posts: 5
Joined: Tue Mar 27, 2007 10:56 pm
Location: Bangalore

Warnings for Null Values

Post by shwetha.st »

Hi All

My requirement is that i have to see warnings for the null values also.
My source is a csv file with 5 columns only and target is relational table.
Taret is something like EMPID,ENAME,LEVEL1,LEVEL2,LEVEL3.
EMPID is a primary key.
My scenario is if the level1,level2,level3 are null there must be a warning message in the director as these columns are null inspite of job being succesful and all othe columns are loaded,which i am not able to see now.
Could any one please help me out in this....


Thanks :lol:
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Derive a stage variable as

Code: Select all

If IsNull(InLink.Level1) Or IsNull(InLink.Level2) Or IsNull(InLink.Level3) Then UtilityWarningToLog("Level field is null") Else 0
. You don't have to use the stage variable.
Last edited by ray.wurlod on Wed Sep 19, 2007 1:26 am, edited 1 time in total.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
sachin1
Participant
Posts: 325
Joined: Wed May 30, 2007 7:42 am
Location: india

Re: Warnings for Null Values

Post by sachin1 »

my doubt is in database are these columns ,LEVEL1,LEVEL2,LEVEL3. null or not null, if it is not null then you can use "Treat Warning as error message checkbox", but then your job will not run.

if they are null we can find some solution for your implementation.
sachin1
Participant
Posts: 325
Joined: Wed May 30, 2007 7:42 am
Location: india

Re: Warnings for Null Values

Post by sachin1 »

sorry regarding improper relply, yes the sdk routine UtilityWarningToLog is what you wanted
Post Reply