Deriving job Info in a transformer

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
laiko
Premium Member
Premium Member
Posts: 35
Joined: Sun May 25, 2008 10:55 am

Deriving job Info in a transformer

Post 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??
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply