#!/usr/bin/qsh
#/*********************************************************
# * THIS PRODUCT CONTAINS RESTRICTED MATERIALS OF IBM
# * 5639-D57, 5630-A36, 5630-A37, 5724-D18 (C) COPYRIGHT International Business Machines Corp. 2005, 2005
# * All Rights Reserved * Licensed Materials - Property of IBM
# * US Government Users Restricted Rights - Use, duplication or disclosure
# * restricted by GSA ADP Schedule Contract with IBM Corp.
# *********************************************************/

printUsage() {
    echo "Usage: $0 jobInformation"
    echo
    echo "$0 will determine if the job identified by jobInformation is active."
    echo "Exit code 1 is returned if active, 0 otherwise."
}

if [ $# -lt 1 ]; then
    printUsage
    exit -1 
fi

system -q "DSPJOBLOG ( $1 )" > /dev/null
RETCODE=$?
if [ $RETCODE -gt 0 ]; then
  exit 0
else
  exit 1
fi
