Listing of Jobs and Categories

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
patonp
Premium Member
Premium Member
Posts: 110
Joined: Thu Mar 11, 2004 7:59 am
Location: Toronto, ON

Listing of Jobs and Categories

Post by patonp »

I know that I can use dsjob.exe with the -ljobs command to retrieve a listing of jobs within a project, but is there any command line utility that I can use to list the categories in which jobs reside?

Thanks!

Peter
Cranie
Premium Member
Premium Member
Posts: 19
Joined: Fri Mar 03, 2006 6:02 pm
Location: Sheffield

Post by Cranie »

via TELNET, you should be able to do this, or Admin (but you require command line) so here goes:

Code: Select all

logto project
SELECT NAME, CATEGORY FROM DS_JOBS
should get what you want.
- - - - -

Cranie

Doing the needful.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Not directly. You can query the DS_JOBS table using DataStage SQL, which can be invoked from a shell script or BAT file. For example (assuming you have an environment variable called DSHOME set to the location of the DataStage installation directory):

Code: Select all

CD $project_dir
%DSHOME%\bin\dssh "SELECT NAME FROM DS_JOBS WHERE NAME NOT LIKE '\%' AND CATEGORY = 'category_name';"

Code: Select all

. $DSHOME/dsenv
here=`pwd`
cd $project_dir
$DSHOME/bin/dssh "SELECT NAME FROM DS_JOBS WHERE NAME NOT LIKE '\%' AND CATEGORY = 'category_name';"
cd $here
You can figure out how to pass poject_dir and category_name to the script and substitute a shell variable in the command.
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