Page 1 of 1

routine_A used by what jobs?

Posted: Mon Apr 21, 2008 6:53 pm
by htrisakti3
hi..
how do I list out what DSjobs use routine_A ?

currently, I export ALL to dsx, and build dsjob to read the dsx & output csv containing: jobname & all derivations. From there I do a search..

There must be easier way..

Thanx.

Posted: Mon Apr 21, 2008 8:14 pm
by ray.wurlod
Get into the Administrator client. Execute the following command, as shown.

Code: Select all

SELECT NAME FMT '35L', CATEGORY FMT '35L' FROM DS_JOBS WHERE JOBNO IN (SELECT OBJIDNO FROM DS_JOBOBJECTS WHERE EVAL "@RECORD" LIKE '%<<Routine Name>>%');
You can substitute your routine name for <<Routine Name>> or, if you don't, the command will prompt you for it.
This query will return all jobs containing the name of the routine, whether it is used as a routine or not, but it will be close to what you have said you require. A variation might be to include the left parenthesis of the routine call.

Code: Select all

SELECT NAME FMT '35L', CATEGORY FMT '35L' FROM DS_JOBS WHERE JOBNO IN (SELECT OBJIDNO FROM DS_JOBOBJECTS WHERE EVAL "@RECORD" LIKE '%<<Routine Name>>(%');

Posted: Mon Apr 21, 2008 9:50 pm
by DS_SUPPORT
Or the Usage Analysis from the Manager Client..