Hi ,
Any idea of how to take the tables used in a job.
Retriving Table Names used in a job
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 247
- Joined: Mon Jan 22, 2007 11:33 pm
Retriving Table Names used in a job
Regards
Ragu
Ragu
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
sequence routine stage sql DataStage 7.5.2
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).
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).
Pete Cundy
Leawood, Kansas
Leawood, Kansas