System information

Sharing and maintaining SLES 10 SP2 Linux under z/VM 73
#+--------------------------------------------------------------------------+
{
userID=$1
CPcmd QUERY $userID
rc=$?
case $rc in
0) # user ID is logged on or disconnected
echo "Error: $userID user ID must be logged off"
exit 2
;;
3) # user ID does not exist
echo "Error: $ID user ID does not exist"
exit 3
;;
45) # user ID is logged off - this is correct - fall through
;;
*) # unexpected
echo "Unexpected rc from QUERY: $rc"
echo "$targetID user ID must exist and be logged off"
exit 4
esac
}
#+--------------------------------------------------------------------------+
function linkSourceDisks()
# Link R/O the source disks 1B0 - 1B8 as 1xxx
#+--------------------------------------------------------------------------+
{
echo ""
echo "Linking source disks ..."
CPcmd link $sourceID 1b1 11b1 rr
if [ $? != 0 ]; then exit 5; fi
CPcmd link $sourceID 1b0 11b0 rr
if [ $? != 0 ]; then exit 6; fi
CPcmd link $sourceID 1b4 11b4 rr
if [ $? != 0 ]; then exit 7; fi
CPcmd link $sourceID 1b5 11b5 rr
if [ $? != 0 ]; then exit 8; fi
CPcmd link $sourceID 1b6 11b6 rr
if [ $? != 0 ]; then exit 9; fi
CPcmd link $sourceID 1b7 11b7 rr
if [ $? != 0 ]; then exit 10; fi
CPcmd link $sourceID 1b8 11b8 rr
if [ $? != 0 ]; then exit 11; fi
}
#+--------------------------------------------------------------------------+
function linkTargetDisks()
# Link R/W the target disks 2b0-2b8 as 2xxx
#+--------------------------------------------------------------------------+
{
echo ""
echo "Linking target disks ..."
CPcmd link $targetID 1b1 21b1 mr
if [ $? != 0 ]; then exit 12; fi
CPcmd link $targetID 1b0 21b0 mr
if [ $? != 0 ]; then exit 13; fi
CPcmd link $targetID 1b4 21b4 mr
if [ $? != 0 ]; then exit 14; fi
CPcmd link $targetID 1b5 21b5 mr