[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

RE: [sqr-users] Executing SQR using Unix Shell Script.



Here is an example we are using on Solaris.
The file setenv.sh sets up the Oracle and SQR environment variables,
including the connect string values.

#!/bin/sh

. /empac/interface/common/common.sh/setenv.sh

echo Execution `date` by `/usr/ucb/whoami`

YMD=`date +%y%m%d`
SHELL="/bin/sh -c"
IBS_HIST=/empac/interface/ibs/ibs.hist
IBS_SQR=/empac/interface/ibs/ibs.sqr
IBS_TXT=/empac/interface/ibs/ibs.txt
IBS_COST_DTL=ibs_cost_dtl
IBS_COST_REF=ibs_cost_dtl_refresh

cd $IBS_TXT

PROCEDURE=ibscost_get
AUDIT_REPORT=ibscost_get.l01
ERROR_REPORT=ibscost_get.lis
COMMAND=echo

if [ -f "$IBS_TXT/$IBS_COST_REF" ]
then
  COMMAND="sqrt $IBS_SQR/$PROCEDURE ${ORACLE_CONNECT}@${ORACLE_TNS}
refresh"
else
  if [ -f "$IBS_TXT/$IBS_COST_DTL" ]
  then
    COMMAND="sqrt $IBS_SQR/$PROCEDURE ${ORACLE_CONNECT}@${ORACLE_TNS}
daily"
  fi
fi

$SHELL "$COMMAND"
RC=$?
if [ $RC -eq 0 ]
then
  echo $PROCEDURE has sucessfully completed
else
  echo $PROCEDURE returned error code $RC
fi
....

-----Original Message-----
From: Prasad. Koneru [mailto:manukoneru@yahoo.com] 
Sent: Thursday, February 19, 2004 10:03 AM
To: sqr-users@sqrug.org
Subject: [sqr-users] Executing SQR using Unix Shell Script.


Hello all,

We are converting our PSoft system from MVS/DB2 to
Unix/Oracle. We have a need to execute all of our
batch jobs using Unix Shell Scripts.

If anyone has a sample working shell script to execute
a SQR in Unix, it will be of great help to us.

Thanks

Prasad Koneru.

__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users