Page 1 of 1

Deriving job Info in a transformer

Posted: Sat Jul 11, 2009 12:30 am
by laiko
I have a database stage which queries from a table of Job Names. It passes it to a transformer. In the transformer, i have the following derivations:

DSGetJobInfo(Lnk_Fr_table.job_name,DSJ.JOBSTATUS)
DSGetJobInfo(Lnk_Fr_table.job_name,DSJ.JOBSTARTTIMESTAMP)
DSGetJobInfo(Lnk_Fr_table.job_name,DSJ.JOBLASTTIMESTAMP)

but they return 0s and 1s instead of the actual string values.

What's wrong with these derivations??

Posted: Sat Jul 11, 2009 12:53 am
by ArndW
The first parameter to all of these routines is the JobHandle, which is the "file unit" to which the job name has been opened using DSAttachJob(). In this case you would also want to add a call to DSDetachJob() so that you don't have too many file units open.

Posted: Sat Jul 11, 2009 7:43 am
by chulett
Write a routine. There you can do the 'attach' to get the handle, query for the information you want and then detach properly. And you can do a better job of handling any problems that way.