#!/bin/sh
#

model=$1
cyc=$2
pgm=$model$cyc

set +x
[ -z "$utilscript" ] && utilscript=/nwprod/util/ush
if test "$err" -ne '0'
then
  echo "*******************************************************"
  echo "******  PROBLEM ARCHIVING $pgm RETURN CODE $err  ******"
  echo "*******************************************************"
  msg1="PROBLEM ARCHIVING $pgm RETURN CODE $err"
  sh $utilscript/postmsg.sh "$jlogfile" "$msg1"
else
  echo " --------------------------------------------- "
  echo " ********** COMPLETED ARCHIVE $pgm  **********"
  echo " --------------------------------------------- "
  msg="ARCHIVE of $pgm COMPLETED NORMALLY"
  sh $utilscript/postmsg.sh "$jlogfile" "$msg"

  if test "$SENDSMS" = "YES"
  then
    ###########################################################
    $SMSBIN/setev $pgm
    ###########################################################
  fi
fi

exit
