Page 1 of 1
Listing Stages From Executable Of A DataStage Job
Posted: Tue Sep 16, 2008 8:15 pm
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.
Posted: Wed Sep 17, 2008 3:23 pm
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.
Posted: Thu Sep 18, 2008 8:23 am
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
Posted: Thu Sep 18, 2008 8:25 am
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
Posted: Thu Sep 18, 2008 3:45 pm
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.
Posted: Fri Sep 19, 2008 7:50 am
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.
Posted: Fri Sep 19, 2008 3:43 pm
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.
Posted: Sun Sep 21, 2008 7:26 pm
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 .
Posted: Sun Sep 21, 2008 8:26 pm
by ray.wurlod
Still doesn't obviate the need to loop over all projects. An export file can pertain only to one project.