Page 1 of 1

Value from DSMacro to Environmental variable

Posted: Wed Oct 05, 2011 5:46 pm
by kogads
Is it possible to use a value returned by a DSMacro and update a Env Variable dynamically, without using shellscript??

what i want to do exactly is, get the DSJobStartTimestamp and use next time job runs and extract data greater than that timestamp.

Posted: Wed Oct 05, 2011 5:59 pm
by narasimha
Dynamically No. You would need to land it somewhere else, maybe a file or a database and read it the next time, you run the job.

Posted: Wed Oct 05, 2011 8:18 pm
by ray.wurlod
A DataStage macro can only be run from within a job.

However you can do this with a routine, using DataStage API calls (specifically DSAttachJob(), DSGetJobInfo() and DSDetachJob() functions), but you'd need to do this before starting the job itself.