Running Powerhouse from a script
Ken Langendock
Ken@Langendock.com
Fri, 15 Oct 2004 10:02:42 -0400 (EDT)
Viet, here is a sample script file that is submitted
by a cron job for Unix.
#---------------------------------------------------------------------
# My program
#
PROCESSDATETIME=`date +%Y%m%d%H%M%S`
PROCESSDATE=`date +%Y%m%d`
#
#---------------------------------------------------------------------
qtp <<E_O_F
exec $QTC/syr990a ; Extract File
$PROCESSDATETIME
E_O_F
#
if [ -s syr990ab.sf ]
then
quiz <<E_O_F
exec $QZC/syr990b ; Report
E_O_F
cat pmr991c.txt | $PRINTER
fi
#
#---------------------------------------------------------------------
# end
AND here is a sample Cron Script. Others may have a
different way of doing this, but with this you can
figure out how to set it up the way you want to.
#-----------------------------------------------------------
# cron.cmd
# Setup PowerHouse environment
PH_USR=/usr/cognos/ph813d1
export PH_USR
. $PH_USR/setpow.sh
# Set up the PowerHouse print environment
#PH_PRINTER="lp -dlj4si"
PH_PRINTER="cat > /dev/null"
export PH_PRINTER
# Setup your application environment here
. $HOME/setup.sh
# Set up file protection mask
umask 002
# Submit the daily job
nohup ksh $COM/myprogram.com &
Good luck
Ken