eef. Ok, as we are all probably aware, Networker's reporting capability is less than stellar. The script I normally use for chasing down chains happens to be highly dependent on some other stuff I've done that's too lengthy to really go into here. (specifically, I export networker's data into mysql).
So, here is a version of my script that's designed (and tested) to work with networker without any localized extensions. The problem is that the pssid field in the media database isn't indexed on, and that's one of the fields you have to use to troll through the media index, so there's a lot of what DBAs call "full table scans" going on. The short version is that it takes a while to run.
calling convention: ssfr.pub <ssid>
method of operation: using the ssid, get the pssid. Keep doing this until you get 0. That will be the head of the ss chain.
Output the record of that ssid. Find the record whose pssid matches the current ssid. if no record is found, we are at the end of the ss chain, otherwise, keep doing this.
ssfr.pub (saveset find related, public version)
[tt]#!/bin/ksh
# check args
if test "${1}" = ""
then
echo "error: must include an ssid"
exit
else
SSID=${1}
fi
# set up vars
WALK=${SSID}
HEAD=1
# step 1: find the beginning of this ss chain
# when pssid=0, we've found the head
while test ${WALK} -gt 0
do
C=$((`mminfo -r pssid -q ssid=${WALK}`))
if test ${C} -gt 0
then
HEAD=${C}
fi
WALK=${C}
done
# step two, output the children searching where pssid=ssid
WALK=${HEAD}
while test ${WALK} -gt 0
do
LINE=`mminfo -v -q ssid=${WALK} 2>/dev/null | grep -v "volume"`
if test "${LINE}" != ""
then
echo "${LINE}"
WALK=$((`mminfo -r ssid -q pssid=${WALK}`))
fi
done[/tt]