Finding a Input Dataset used in jobs

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
mohan bommalingaiah
Participant
Posts: 3
Joined: Tue Oct 02, 2007 5:04 am

Finding a Input Dataset used in jobs

Post by mohan bommalingaiah »

How do i find all the job names that may be using a specific dataset easily, without having to go through each job to find out what inputs it is using in datastage.

Any kind of help will be appreciated.
M-B
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Use the following query at the uv account or admin command, once logged into your project.

Code: Select all

SELECT 
   DISTINCT DS_JOBS.NAME AS JOB_NAME FMT '100L', 
   DS_JOBS.CATEGORY FMT '100L', 
   DS_JOBOBJECTS.NAME AS OBJECT_NAME FMT '100L', 
   DS_JOBOBJECTS.OLETYPE FMT '100L', 
   EVAL DS_JOBOBJECTS."if index(@RECORD,'FIND ME',1) > 0 then 'FOUND' else ''" AS FOUND FMT '5L' 
FROM 
   DS_JOBS, 
   DS_JOBOBJECTS 
WHERE 
   DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDNO 
   and FOUND = 'FOUND' 
GROUP BY 
   JOB_NAME, 
   DS_JOBS.CATEGORY, 
   OBJECT_NAME, 
   DS_JOBOBJECTS.OLETYPE, 
   FOUND 
; 
Put in your dataset name where it says 'FIND ME'. Use it and Thank Kim Duke. Its his code.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

I don't have 7.x, but believe you can do a "Where used" from Manager.
mohan bommalingaiah
Participant
Posts: 3
Joined: Tue Oct 02, 2007 5:04 am

Finding a Input Dataset used in jobs

Post by mohan bommalingaiah »

Thanks very much, and the special thanks to Kim Duke.
M-B
sendmkpk
Premium Member
Premium Member
Posts: 97
Joined: Mon Apr 02, 2007 2:47 am

Post by sendmkpk »

Hi,

I am using 8.1, I tried this code by kim, doesnt seem to work

or is it cause of the job parameters used in it,

plz share a thought.

Reg
Praveen
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

If your dataset name is in a job parameter, then this method won't work - you would need to do a more complex search. On the other hand, if you know the parameter name you could search for that.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

DSguru2B wrote:Use the following query at the uv account or admin command, once logged into your project.
This is not a suitable answer for version 7.x. Also it would not work in the UV account.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Hmmm... what about the code is not applicable to the 7.x version? And you are getting picky about the "uv account" comment, he did say "once logged into your project" after that, so correct in spirit. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The table structures (and column names) have changed since version 7.x.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

This looks like the 7.x code (and table/column names) that I knew back in the day, did you actually mean it won't work with versions after 7.x? Sorry, just trying to understand your statement.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply