uv command

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
attu
Participant
Posts: 225
Joined: Sat Oct 23, 2004 8:45 pm
Location: Texas

uv command

Post by attu »

if I only know a jobname , how can I know which project it belongs to using UV command?

Thanks
Ronetlds
Participant
Posts: 28
Joined: Thu Mar 30, 2006 12:48 pm

Post 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
Ronetlds
Participant
Posts: 28
Joined: Thu Mar 30, 2006 12:48 pm

Post 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
Post Reply