Page 1 of 1

Retriving Table Names used in a job

Posted: Thu Sep 20, 2007 12:03 am
by Ragunathan Gunasekaran
Hi ,
Any idea of how to take the tables used in a job.

Posted: Thu Sep 20, 2007 12:15 am
by ray.wurlod
Search the forum. Chuck Smith has a utility, Kim Duke has a utility. Or you can interrogate the Repository if you prefer to re-invent the wheel.

Posted: Thu Sep 20, 2007 6:41 am
by kduke
If you are using server then Repository Assistant can help extract job designs into Access.

sequence routine stage sql DataStage 7.5.2

Posted: Thu Sep 20, 2007 7:30 am
by cundyp
I have used a sequence routine stage to call a routine which will create a list of jobs in which a particular table is used.
The TableName variable can be replaced with FileName and will create a list a list of jobs in which a particular file is used.

*------Searching for all jobs with vTableName ------*
cmd = \SELECT DISTINCT EVAL DS_JOBOBJECTS."IF INDEX(@RECORD,'\:vTableName:\',1) > 0 THEN 'FOUND' ELSE 'NTFND'",\
cmd := \ DS_JOBS.NAME AS JOB_NAME FMT '40L' \
cmd := \ FROM DS_JOBS,DS_JOBOBJECTS \
cmd := \ WHERE DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDNO\
cmd := \ ORDER BY 1,2;\

The sql can also be executed at the Administrator Command Line (as a
single string).