Page 1 of 1

output value from a job as input of a user variable activity

Posted: Wed Dec 16, 2009 3:43 am
by farkney
Good morning everybody,

is there a solution and maybe an example, how to process a delta of data records which can be identified by a timestamp?
There is the situation that the source table gets every day some new records, with the timestamp of the DB insertion. My idea was that I write the highest timestamp of the last run to a database table and before every run I collect this timestamp and put it as low value in the where part of the select statement. But I miss a way how to make that value available as output of a job, make it available to a sequence and have it available as input of a user variable activity.
Are there any hints how to get this solved?
There is a solution doing that with a shell script, but I like to know how to do that just in DataStage.

Thank you very much for your help
Best Regards
Frank

Re: output value from a job as input of a user variable acti

Posted: Wed Dec 16, 2009 6:04 am
by biju.chiramel
According to me...
Option 1. store the timestamp of run in a hashfile.
pull all the data from source.
filter with hash value and propagate only new records.

Option 2. Store timestamp in hashfile
create routine to read the hashfile and output the value.
call this routine in Routine Activity.
Pass the value to Job Activity and use in WHERE condition.

Posted: Wed Dec 16, 2009 6:08 am
by Sainath.Srinivasan
Search for SetUserStatus.

Works in Server edition.

For PX, the date is accessed from the table using a join or something similar.

Generally people use server edition work to get the values and pass to PX jobs.