#!/bin/ksh
###############################################################################
#
# EBM BATCH JOB MACRO :     LASTRC
# Purpose             :     Returns the value of the return code of the 
#                           previous step. If no previous step was executed,
#                           MAXRC returns zero.
# 
###############################################################################
. verify_jobstatus
. beginjob.${EBMSYS}.${JON}
LASTRC=0 ; export LASTRC
if [ -f ${JON}_RET ]
then
   LASTRC=`cat ${JON}_RET | cut -f2 -d' '`; export LASTRC
fi
echo $LASTRC
