Page 1 of 1

Get Job Category

Posted: Wed May 09, 2007 9:05 am
by poorna_76
Is there any DSMacro or System Variable to get the Job Category?

For getting the JobName we have DSJobName, iam looking for a similar thing for getting the Job Category.

Thanks in Advance.

Posted: Wed May 09, 2007 9:24 am
by csrazdan
You can get job category by running following command either on DataStage Administrator GUI or UV command:

LIST DS_JOBS WITH NAME <Your job name>

This command will display Job name, Job Number and Job Category. If Category is NULL it would mean job is available at under /Jobs folder

I don't think DataStage has a Macro or system variable for display category of a job.

Hope it helps........

Posted: Wed May 09, 2007 10:31 am
by poorna_76
Thanks csrazdan.

I am familiar with querying the Administrator for the Job Category.
But I would like to display the Job Category in a Sequence EMail Notification message, rather than querying from Administrator.

Posted: Wed May 09, 2007 10:36 am
by chulett
No, there is no macro for that - you would need to query the repository. I've done that inline in a job using a UV stage lookup, it's not that difficult to setup.

Posted: Wed May 09, 2007 7:19 pm
by ray.wurlod

Code: Select all

Trans("DS_JOBS", DSJobName, 3, "X")
Here DSJobName is a macro.

Posted: Wed May 09, 2007 11:24 pm
by chulett
Really? :?

Huh... gonna have to look that puppy up.

Posted: Thu May 10, 2007 12:51 am
by ray.wurlod
:!:
Note: This function (Trans()) is available in job sequence expression derivations, not in parallel job expressions. The OP specified job sequence.

The function is documented in the DataStage BASIC manual. It does the same job as UtilityHashLookup() but far more efficiently.

Posted: Fri May 11, 2007 1:41 pm
by poorna_76
ray.wurlod wrote::!:
Note: This function (Trans()) is available in job sequence expression derivations, not in parallel job expressions. The OP specified job sequence.

The function is documented in the DataStage BASIC manual. It does the same job as UtilityHashLookup() but far more efficiently.
Ray,

I tried to use this in a Job Sequence and i am getting a copilation error,
Variable 'Trans' not defined.

Thanks in Advance.

Posted: Fri May 11, 2007 4:01 pm
by ray.wurlod
There must not be a space between the function name (Trans) and the following left parenthesis.