Getting job name or number from Linux command line?

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
w951bvc
Participant
Posts: 12
Joined: Mon Aug 16, 2004 10:53 am
Location: Milwaukee, WI

Getting job name or number from Linux command line?

Post by w951bvc »

Quick question (hopefully).

From the command line, if I have a job name, is there any way to easily get the job number? (-jobinfo output doesn't contain this.)

*OR* from the command line, if I have the job number, is there any way to easily get the job name? I tried searching the various RT_ files with no luck.

Either name -> number or number -> name will work for what I need. I'm trying to create a cron job to monitor the log file sizes for our web-services, but in order to do so I need to match up job names and numbers via scripting.

Both web and DSXchange searches on the topic have been fruitless.

Thanks,

Richard
Milwaukee, WI
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The following approach will work from the command line.

Code: Select all

cd $ProjectDirectory

. $DSHOME/dsenv

$DSHOME/bin/dssh "SELECT JOBNO FROM DS_JOBS WHERE NAME = '<<Job name>>';"

$DSHOME/bin/dssh "SELECT NAME FROM DS_JOBS WHERE JOBNO = '<<Job number>>';"
The column heading and summary report can be suppressed using keywords.

Code: Select all

$DSHOME/bin/dssh "SELECT JOBNO FROM DS_JOBS WHERE NAME = '<<Job name>>' COL.SUP COUNT.SUP;"

$DSHOME/bin/dssh "SELECT NAME FROM DS_JOBS WHERE JOBNO = '<<Job number>>' COL.SUP COUNT.SUP;"
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
w951bvc
Participant
Posts: 12
Joined: Mon Aug 16, 2004 10:53 am
Location: Milwaukee, WI

Post by w951bvc »

Thanks for the info - this should work great. I'm embarassed to admit I didn't know that we had a way to execute uverse commands outside of Administrator. I'll be digging into using this over the weekend.

Thanks again,

Richard
Post Reply