#######################################################################
# Issue a pdpr, echo the job ID, and return with the same return code
# that was received from pdpr.
#
# Parameters are:
#     1.    Attributes to be passed via -x
#     2-n.  All other command line arguments
#
# This is intended to be used as follows:
#
#   MYJOBNUM=`submitJob '...pdpr options...'`
#   if [[ $? -ne 0 ]]
#   then
#          ...
#
# Author:  Alan Hlava
#######################################################################
#set -x
# Issue the pdpr command, writing the output to a file
DASHX=$1
shift
pdpr -r brief -x "$DASHX" $* >/tmp/$$
PDPRRC=$?
cat /tmp/$$ | tail -1 | awk '{ print $1 }'
rm -f /tmp/$$
exit $PDPRRC
#set +x
#
#    Version      Date     Time    Owner   Comment
# ------------- -------- -------- -------- ----------------------------
# V             10/20/94 13:56:22 hlava    Original version
