You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
set -o pipecurrent # rqd for | read
# set some new JES symbols
jessym -c DSN1=MY.FOO.IN <http://my.foo.in/> DSN2=MY.FOO.OUT
# submit a job, passing all JES symbols, and get the jobid
todsn -x "symlist(*)" //intrdr | read x jobid <<EOF
//${LOGNAME}A JOB (),'Kirk'
...
//
EOF
echo "JOB $jobid submitted"
# wait a bit for the job to run
i=0
while [[ i -lt 20 ]]; do
lsjes -t -i $jobid | read x jobname x phase x compl
# lsjes outputs a line like:
# JOBnnnn JOBNAME USERID PHASE CLASS RC=XXXX
if [[ "$phase" == "OUTPUT" ]]; then
echo "JOB $jobname($jobid) completed $compl"
# grab one of the job's spool files and print it to stdout
# or maybe your want to use awk/grep/sed to process it?
fromdsn -JES.$jobid.JESJCL
break
fi
let i=i+1
sleep 2