Previous Topic: xcompre Options

Next Topic: Example


Sample Script

The following is the sample xcompre script:

#!/bin/sh
# @(#)xcompre.sh

#       This procedure is invoked by the CA XCOM Data Transport
#       transaction program for all locally and remotely initiated 
#       transfers before they begin.

tid=$1

echo $1 > /tmp/$tid.tidlog

# required for HPUX-10
if [ `uname` = 'HP-UX' ]
then PATH=/opt/xcom/bin:$PATH
fi

xcomqm -g$tid |grep USERID > /tmp/$tid.userlog

'egrep' 'payroll|finance' /tmp/$tid.userlog

if [ $? -ne 0 ]
    then
    exit 100
else
    xcomqm -p$tid LOCAL_FILE=/u/jc/test/000040.local  \
    REMOTE_FILE=abcdefg 
    FILE_OPTION=CREATE 
    2>&1 > /tmp/$tid.errlog
    exit 0
fi