#!/bin/sh

# Replace the following with your path to SQR
export SQRDIR=/usr/local/sqr5/v5.1/ora/bin

#Our version of SQR requires the following lines to set up dynamic linking
path_subst=/usr/local/bin/path_subst
export ORACLE_BASE=/usr/local/oracle8
export ORACLE_HOME=$ORACLE_BASE/product/8.0.5
export LD_LIBRARY_PATH=`${path_subst} "$LD_LIBRARY_PATH" \
                             $OLD_ORACLE_HOME/lib $ORACLE_HOME/lib`

# Uncomment the following three lines to debug scripts that are 
# producing errors.
#echo 'Content-type: text/plain'
#echo ''
#echo ''
#
cd /proj/www/WWW/sqr/cgi-lib/
#
# It is important to include "-xb" to supress the SQR banner.
# The first output of the program must be a HTTP header.
# "-xl" prevents database login.  You will probably want to remove it.
$SQRDIR/sqr example2.sqr / -xl -xb -printer:PD
