#!/bin/sh

#####################################################################
# --- 08/05/1999 ---------- EXDUMP_ALERT SCRIPT -------------------
echo "         MAR 2000 - Modified for implementation of the IBM SP"
echo " "
#####################################################################

cd $DATA

########################################
set -x
msg="HAS BEGUN!"
postmsg "$jlogfile" "$msg"
########################################


# List NCEP date
export analtime=`cut -c7-16 ncepdate`

set +x
echo "CENTER DATA DUMP DATE-TIME FOR $NET IS $analtime"
set -x
 
# ---------------------------------------
# check for severly low data counts 
# ---------------------------------------

RETC=`cat $COMIN/$RUN.$cycle.dump_alert_flag` 
export RETC
if [ $RETC -eq 6 ]
   then
   msg="DATACOUNT low on 1 or more CRITICAL ob types - SDM should check \
ALERTLOG messages"
   postmsg "$jlogfile" "$msg"
   echo $msg > errfile
   export err=6
   err_chk
elif [ $RETC -eq 5 ]
   then
   msg="DATACOUNT low on 1 or more non-critical ob types - SDM should check \
ALERTLOG messages"
   postmsg "$jlogfile" "$msg"
fi

#####################################################################
# GOOD RUN
set +x
echo "************** $job COMPLETED NORMALLY ON THE IBM SP"
echo "************** $job COMPLETED NORMALLY ON THE IBM SP"
echo "************** $job COMPLETED NORMALLY ON THE IBM SP"
set -x
#####################################################################

msg="HAS COMPLETED NORMALLY!"
postmsg "$jlogfile" "$msg"
############## END OF SCRIPT #######################

