Get the stage name in all jobs

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Umberto
Participant
Posts: 11
Joined: Mon Apr 23, 2007 6:10 am

Get the stage name in all jobs

Post by Umberto »

Hi

I need to look for a Job referencing a stage, Teradata export Stage, with a particular name. I think to do that using dsjob utility in a Windows Shell Script. It list all jobs existing in my project and for each of them it list all stages. I qualified the stage interesting me filtered them by the names.

Is there another way to have the same information????

Thank you very much in advance....

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

Post by ArndW »

That is a good method, particularly if you have it working. You could export the project into a .dsx file and search that file in a text editor. Or write some code around DSGetProjectInfo(), DSGetJobInfo(), DSGetStageInfo() either in DS/Basic or in C++
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post by lstsaur »

Another way to get the information that you want is to use RTI's Job Control Web Service which exposes the DataStage Job Control API, e.g., GetProjectNames, GetJobNames, GetJobParameters, GetStageName, GetLinkNames, RunJob, etc.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Code: Select all

Select
   NAME as StageName
From
   DS_JOBOBJECTS
Where
   OLETYPE LILE '%Stage'
;
Should get you close.
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Suspect job name is also required, so a join to DS_JOBS is needed.

Code: Select all

SELECT BREAK ON "'O'" DS_JOBS.NAME JobName, DS_JOBOBJECTS.NAME StageName FMT '48L'
FROM DS_JOBS, DS_JOBOBJECTS
WHERE DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDNO
AND DS_JOBOBJECTS.OLETYPE LIKE '%Stage%' 
ORDER BY 1, 2 ;
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply