#!/bin/sh
if [ "$DOSQLDBG" != "true" ]; then
DOSQLDBG="false"
DOWEB="false"
fi
if [ -z "$sqldbgfile" ]; then
sqldbgfile=""
fi
if [ -z "$DOWEB" ]; then
DOWEB="false"
fi
# Testing
sqldbgfile="/tmp/sql.log"
DOSQLDBG="true"
$DOSQLDBG && echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" >>"$sqldbgfile"
$DOSQLDBG && echo "stdsqlheader: "`date` 2>&1 >>"$sqldbgfile"
#---------------------------------------------------------------------
sqlid="0"
. /u/catcom/catcom_vars
#---------------------------------------------------------------------
dbgecho()
{
$DOSQLDBG && echo "$1" >>"$sqldbgfile"
$DOWEB && echo "
" >>"$sqldbgfile"
}
#---------------------------------------------------------------------
sqlmy_status()
{
if [ "$DOWEB" = "true" ]; then
my_status "$1"
else
echo "$1"
fi
}
sqlmy_error()
{
errstr="ERROR: $1"
if [ "$DOWEB" = "true" ]; then
echo "$errstr"
echo "
"
else
echo "$errstr"
fi
}
sqlmy_exit()
{
if [ "$DOWEB" = "true" ]; then
sqlmy_status "Done."
echo "