#! /usr/bin/ksh
# approval_errors.shl		Check for Requisitions Pending with Errors 
# /*Use this information and these scripts at your own risk. As a condition of using these scripts and information from this site, you agree to hold harmless both the University of Arkansas Cooperative Extension Service and Bruce Knox for any problems that they may cause or other situations that may arise from their use, and that neither the Extension Service nor I will be held liable for those consequences. The scripts and information are provided "as is" without warranty, implied or otherwise. Limitation of liability will be the amount paid to the University of Arkansas specifically for this information. (It was free:) # */ 
echo 
date
print approval_errors.shl beginning Requisitions Pending with Errors 
cd /home/common

# remove prior email file
rm -f approval_queue_errors.shl

# extract from Banner

PATH=/usr/bin:/usr/lbin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:.:/u00/oracle/product/version/bin
export PATH
export ORACLE_SID=PROD
export ORAENV_ASK=NO
. /usr/lbin/oraenv

echo password | sqlplus -s userid @approval_queue_errors.sql
#                                        use echo and -s to hide pw

# The email is sent only if errors are detected by approval_queue_errors.sql
print
date
print approval_errors.shl    ending Requisitions Pending with Errors 
# end of approval_errors.shl
