#! /usr/bin/ksh # leave_requests_gather.shl Gather Leave Requests for LEAVE Table, Conditional Send email Notices to Managers # /*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:) # */ print date print leave_requests_gather.shl beginning Gather Leave Requests for LEAVE Table # Change the following command to use the location of your scripts. cd /home/scripts_directory # remove prior email file rm -f leave_requests.shl # extract from Banner # Change the following PATH= to use your Banner PATH 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 @leave_requests_gather.sql # use echo and -s to hide pw # set to 740 in leave_requests.shl if [ -s "/home/common/leave_requests.shl" ] then echo 'leave requests notice found to mail' leave_requests.shl exit else print No Leave Requests Notice To Mail print date print leave_requests_gather.shl ending Gather Leave Requests for LEAVE Table exit 1 fi print date print leave_requests_gather.shl ending Gather Leave Requests for LEAVE Table