#-------------------------------------------------------------------------------
# Function to test if calling script is able to locate and read a file.
# Parameters; $1 = filename; $2 = debug switch (ksh set: +x for off, -x for on).
#-------------------------------------------------------------------------------

EXISTENCE_TEST()
{
 set "$2"
 FILE="$1"
 DEBUG_SWITCH="$2"
 if [[ -f $FILE && -r $FILE ]]
 then :
 else
    MESSAGE "Unable to locate or read file: \"${FILE}\", exiting script." PLAIN E $DEBUG_SWITCH 
    return 1
 fi
}
