#!/usr/bin/ksh
#
# Name:         oracleScript familyName
#
# Purpose:      This is a sample shell script that shows
#               how to issue a set of Oracle command lines.
#
# Notes:        It uses the environment variable $ORACLE_PASS
#               which has the password for the CMVC family.

# Process the proper number if input parameters

if [ "$#" -ne 1 ]
then
   print -u2 'usage:  oracleScript familyName   '
   exit 1
else
   print 'oracleScript: Starting script ' $1
fi

export LOG=oracleScript.out

####### Customization notes #############################################
# Place the actual Oracle commands inside the begin and end !!!
# Remember to put the ; (semicolon) at the end of each logical statement
#########################################################################

sqlplus $1/$ORACLE_PASS >> $LOG 2>&1 <<!!!
select * from Sequence;
!!!
# The above !!! indicates the end of the long series of Oracle commands

print ' '
print 'oracleScript: Please see the following log for the details'
print '          of the execution of the Oracle commands: ' $LOG
print ' '
print 'oracleScript: End of script'

exit 0

# end of file
