Appendix A. Scripts used in the solution 191
echo
"\n\r==========================================================================
===== \n\r " >> $ARSLOAD_FAILED 2>&1
echo "arsload: Processing FAILED for file $UNISON_STDLIST"
echo
"\n\r==========================================================================
===== \n\r " >> $ARSLOAD_FAILED 2>&1
cat $ARSLOAD_TMP_OUTPUT >> $ARSLOAD_OUTPUT 2>&1
cat $ARSLOAD_TMP_OUTPUT >> $ARSLOAD_FAILED 2>&1
rm -f $ARSLOAD_TMP_OUTPUT
fi
fi
fi
UNISON_STDLIST_ARD=$MAESTROHOME_ONDEMAND/$OS\.stdlist.$UNISON_SCHED_DATE\.O$UNI
SON_JOBNUM$UNISON_END.log.ARD
ln -fs $UNISON_STDLIST $UNISON_STDLIST_ARD
if [ $? -ne 0 ]
then
echo
"\n============================================================================
=== \n\r" >> $ARSLOAD_FAILED 2>&1
echo "link: Processing FAILED for file $UNISON_STDLIST" >> $ARSLOAD_FAILED
2>&1
echo
"\n============================================================================
=== \n\r" >> $ARSLOAD_FAILED 2>&1
fi
Logpush script: tws_ondemand_logpush.sh
#!/bin/ksh -x
#
# Netman / TWSMERGE / Audit Database and Plan script - tws_ondemand_logpush.sh
#
OS=$(uname)
if [[ ${OS} = AIX ]] ; then
OS=unix
PRODUCT_DIR=/usr/lpp/ars
elif [[ ${OS} = HP-UX ]] ; then
OS=unix
PRODUCT_DIR=/opt/ondemand
192 Integrating IBM Tivoli Workload Scheduler Suite and Content Manager OnDemand
elif [[ ${OS} = SunOS ]] ; then
OS=unix
PRODUCT_DIR=/opt/ondemand
elif [[ ${OS} = Linux ]] ; then
OS=linux
PRODUCT_DIR=/opt/ondemand
else
OS=unix
PRODUCT_DIR=/usr/lpp/ars
fi
export OS PRODUCT_DIR
. $PRODUCT_DIR/scripts/tws_ondemand_env.sh
#####
##### NETMAN.log
#####
UNISON_STDLIST=$MAESTROHOME_STDLIST/logs/$DATE\_NETMAN.log
UNISON_STDLIST_ARD=$MAESTROHOME_ONDEMAND/$OS\.netman.$DATE\.NETMAN.log.twsod.AR
D
export UNISON_STDLIST UNISON_STDLIST_ARD
LOG="NETMAN"
ARSLOAD_HOSTNAME=`head -1 $UNISON_STDLIST | awk -F"|" '{ printf("%-16s| ", $5)
}'`
if [ -f $UNISON_STDLIST ]
then
echo "$ARSLOAD_HOSTNAME$LOG" > $UNISON_STDLIST_ARD 2>&1
if [ $? = 0 ]
then
cat $UNISON_STDLIST >> $UNISON_STDLIST_ARD 2>&1
if [ $? != 0 ]
then
echo "netman(cat): Processing FAILED for file $UNISON_STDLIST_ARD"
fi
else
echo "netman(echo): Processing FAILED for file $UNISON_STDLIST_ARD"
fi
fi
#####
##### TWSMERGE.log
#####
UNISON_STDLIST=$MAESTROHOME_STDLIST/logs/$DATE\_TWSMERGE.log
Appendix A. Scripts used in the solution 193
UNISON_STDLIST_ARD=$MAESTROHOME_ONDEMAND/$OS\.twsmerge.$DATE\.TWSMERGE.log.twso
d.ARD
export UNISON_STDLIST UNISON_STDLIST_ARD
LOG="TWSMERGE"
ARSLOAD_HOSTNAME=`head -1 $UNISON_STDLIST | awk -F"|" '{ printf("%-16s| ", $5)
}'`
if [ -f $UNISON_STDLIST ]
then
echo "$ARSLOAD_HOSTNAME$LOG" > $UNISON_STDLIST_ARD 2>&1
if [ $? = 0 ]
then
cat $UNISON_STDLIST >> $UNISON_STDLIST_ARD 2>&1
if [ $? != 0 ]
then
echo "twsmerge(cat): Processing FAILED for file $UNISON_STDLIST_ARD"
fi
else
echo "twsmerge(echo): Processing FAILED for file $UNISON_STDLIST_ARD"
fi
fi
#####
##### Audit Database
#####
UNISON_STDLIST=$MAESTROHOME/audit/database/$DATE
UNISON_STDLIST_ARD=$MAESTROHOME_ONDEMAND/$OS\.database.$DATE\.DATABASE.log.twso
d.ARD
export UNISON_STDLIST UNISON_STDLIST_ARD
LOG="DATABASE"
ARSLOAD_HOSTNAME=`hostname | awk '{ printf("%-16s| ", $0) }'`
if [ -f $UNISON_STDLIST ]
then
echo "$ARSLOAD_HOSTNAME$LOG" > $UNISON_STDLIST_ARD 2>&1
if [ $? = 0 ]
then
cat $UNISON_STDLIST >> $UNISON_STDLIST_ARD 2>&1
if [ $? != 0 ]
then
echo "audit database(cat): Processing FAILED for file
$UNISON_STDLIST_ARD"

Get Integrating IBM Tivoli Workload Scheduler and Content Manager OnDemand to Provide Centralized Job Log Processing now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.