Page 1 of 1
uv command
Posted: Thu Oct 04, 2007 8:25 am
by attu
if I only know a jobname , how can I know which project it belongs to using UV command?
Thanks
Posted: Thu Oct 04, 2007 9:34 am
by Ronetlds
Write a unix script:
loop through output of dsjob -dsprojects to get $PROJNAME or similar
then dsjob -jobinfo $PROJNAME yourjobname | grep -i category | wc -l > ctr
if ctr >0 then echo $PROJNAME
Posted: Thu Oct 04, 2007 9:52 am
by Ronetlds
or create shell looping for each $PROJNAME found using dsjob -lprojects,
#### $JOBNAME is your job
#### define a $LOGFILE
cd ${DSHOME}
bin/uvsh >${LOGFILE} 2>&1 << EOF
LOGTO ${PROJNAME}
LIST DS_JOBS WITH NAME=${JOBNAME}
QUIT
EOF
cd
echo " " ${PROJNAME} " ${JOBNAME} " `cat ${LOGFILE} | grep -i category | sed s/Category....
//g`
The project that returns a category is the you're looking for.
Anyway this is the general idea, you can play with this to get the desired output