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
Getting job name or number from Linux command line?
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The following approach will work from the command line.
The column heading and summary report can be suppressed using keywords.
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>>';"
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.