Page 1 of 1

File name

Posted: Thu Mar 15, 2007 12:49 pm
by srimitta
Hi Guys,

I have a job which loads Seq File (file.txt) and this Seq File (file.txt) is used by many jobs and I have no track of what all the dataStage jobs using this file (file.txt).

Any one any idea to find out what all the dataStage jobs using this file (file.txt), other than manually keeping track of jobs.

Thanks
Srimitta

Posted: Thu Mar 15, 2007 8:08 pm
by ray.wurlod
IF you have been systematic about managing your metadata, and only ever loaded the table definition into these jobs from the Repository, then your answer is as simple as choosing that table definition in Manager and requesting a Usage Analysis (the beaker-shaped tool on the Toolbar).

Posted: Thu Mar 15, 2007 10:01 pm
by DS_SUPPORT
A Search on this forum would have given you the results, Kim Duke has already posted lot of scripts to do the tasks like this.

For you the code would be like

Code: Select all

select 
   EVAL DS_JOBOBJECTS."@RECORD<6>" AS FILE_NAME FMT '45L', 
   DS_JOBS.NAME AS JOB_NAME FMT '35L', 
   DS_JOBOBJECTS.NAME AS LINK_NAME FMT '35L' 
from 
   DS_JOBOBJECTS, 
   DS_JOBS 
where 
   DS_JOBOBJECTS.OLETYPE in ('CSeqOutput','CSeqInput') 
   and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO 
   and EVAL DS_JOBOBJECTS."@RECORD<6>" = 'file.txt'
group by 
   FILE_NAME, 
   JOB_NAME, 
   LINK_NAME 
;