Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Media used for a specific JobID

Status
Not open for further replies.

JayKoonz

MIS
Apr 15, 2004
20
US
I currently create an xls daily listing information on jobs run-okay/not-run-okay/should-have-run-but-didnt/etc. I have been asked to expand the report to show the media used for each job. I don't see any way in bpimagelist or bpimmedia to list media limited to a single jobid. And it doesn't look like bpdbjobs reports on media at all.
Anyone know of a way to get the media used by jobid.
 
I came up with one way to get media used by jobid.

bpdbjobs doesn't report on the media but it does give the policy. Take the policy and put it into bpimagelist and it will return the media used. Use the following command replacing JOBID with the actual number. Hope this helps.

bpimagelist -U -media -policy `bpdbjobs -report |grep JOBID |awk '{print $5}'`

I put it into a script to test it.
#>cat quick.scr
echo 'enter job id'
read jobid
bpimagelist -U -media -policy `bpdbjobs -report |grep $jobid |awk '{print $5}'`
#>./quick.scr
enter job id
488896
Media ID Last Written Server
-------- ---------------- ----------
BV1039 08/18/2004 03:40 bvms1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top