Listing Stages From Executable Of A DataStage Job

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
kamesh
Participant
Posts: 72
Joined: Tue May 27, 2003 1:47 am

Listing Stages From Executable Of A DataStage Job

Post by kamesh »

Hi,
I have a requirement to list all the stages active/passive for all server or parallel jobs in each project. The blow query works good for me but it returns ZERO records when I hit a job without the design time information.

$DSHOME/bin/uv "SELECT NAME FROM DS_JOBOBJECTS WHERE STAGETYPE NOT LIKE '' AND OBJIDNO IN (SELECT JOBNO FROM DS_JOBS WHERE NAME = '$job_name');"

I also tried using dsjob, but it doesn't return me the list of passive stages in the job.

Any help on this is very much appreciated.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It's a value mark, its ASCII code point is 253 (decimal). You can use tr to convert it to some other character, such as a comma. \375 is the octal equivalent. \xFD is the hexadecimal equivalent.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kamesh
Participant
Posts: 72
Joined: Tue May 27, 2003 1:47 am

Post by kamesh »

Thank you very much Ray!!!

Do we still have an option to query the Universe database to get this list of stages from executable of a DataStage job?

Note: RT_CONFIG file happens to be a difficult choice for me to get this list
kamesh
Participant
Posts: 72
Joined: Tue May 27, 2003 1:47 am

Post by kamesh »

Thank you very much Ray!!!

Do we still have an option to query the Universe database to get this list of stages from executable of a DataStage job?

Note: RT_CONFIG file happens to be a difficult choice for me to get this list
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can get three different lists of stage types (active, passive and all) using DSGetJobInfo().

If you don't have design time information, then I believe that RT_CONFIGnnn is your only choice. But I'd need to check that.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kamesh
Participant
Posts: 72
Joined: Tue May 27, 2003 1:47 am

Post by kamesh »

I have already tried the option of writing BASIC routine using DSGetJobInfo() but the only setback I realize is running this basic routine standalone on the UNIX command line of the DataStage server so that I can loop it through all the 50 projects.

Please guide me with an option if I can run the BASIC routine from the UNIX command prompt pointing to different projects in the routine logic.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You'd need a loop in the UNIX script to access each project in turn, and to install the DataStage BASIC routine in each of those projects or globally. As a general rule global cataloging is not a preferred approach in DataStage but it is, however, supported. Details can be found in the DataStage BASIC manual.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chucksmith
Premium Member
Premium Member
Posts: 385
Joined: Wed Jun 16, 2004 12:43 pm
Location: Virginia, USA
Contact:

Post by chucksmith »

Take a look at my List all tables and files used by jobs in a dsx file tool. It may be a starting point for what you need. It works best with server jobs, but has basic support for parallel job.

You will find it on the DataStage Tools page of www.anotheritco.com .
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Still doesn't obviate the need to loop over all projects. An export file can pertain only to one project.
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