return to PRS Technologies website


check_mcur_prof.sh
################################################################################ # # Module: check_mcur_prof.sh # # Description: Check for multiple current proformas # If records exist, a notification email should be generated. # # Author: Peter R. Schmidt and Mary Ann Tracy # # Change Log # # Date Person Description # # 03/28/2002 Peter Schmidt Start program # ################################################################################ # # if [ $# != 2 ] # then # echo "Usage: check_mcur_prof.sh" # exit 1 # fi # ################################################################################ if [ "x$INFORMIXDIR" = "x" ] then . /elite/custom/run.elite # Set the informix environment fi TMPFILE1=$DBTEMP/check_mcur_prof.tmp rm -f $TMPFILE1 ############################################################################### dbaccess son_db <<-EOF >/dev/null 2>&1 unload to "$TMPFILE1" delimiter " " select phmatter, phdate, count(*) cnt from prohead where phstatus = "C" group by 1,2 having count(*) > 1 order by 1,2; EOF if [ -s $TMPFILE1 ] then ERR_CNT=`cat $TMPFILE1 | wc -l` ERR_CNT=`expr $ERR_CNT + 0` echo "Warning: $ERR_CNT records exist that have multiple current proformas" echo echo " Matter Date Number of Current Proformas" echo cat $TMPFILE1 fi rm -f $TMPFILE1 ################################################################################