#! /usr/bin/ksh
#
# function: compErrorMsg
#
# $1: error message caller expects to find 
# $2: file containing expected error message
#
# searches file for an error message string
# exits with 0 if message is found; otherwise exits with 1

PARM_ANS=$1
grep -q "$PARM_ANS" $2
if [[ $? -ne 0 ]]
then
    # error - did not find error message
    reportError "---------- ERROR: compErrorMsg ----------
    Error message not found: $PARM_ANS"
    exit 1:;
fi

exit 0

#
#    Version      Date     Time    Owner   Comment
# ------------- -------- -------- -------- ----------------------------
# V             03/03/94 11:40:39 longstaf New function.
# V1.2          03/03/94 12:03:04 longstaf Modified to report an error message.
# V1.2.1.1      03/17/94 10:07:06 longstaf Changed case to look for PARM_ANS in ERROR_MSG.
# V1.2.1.2      03/17/94 11:26:43 longstaf Replace case with check of return code from grep.
