On Thu, Nov 13, 2014 at 1:49 PM, Kirk Wolf <[email protected]> wrote:

> John,
>
> RE: INTRDR - You mean something boring like this?
>
> todsn //intrdr <<EOF
> //${LOGNAME}A JOB (),'Kirk'
> // EXEC PGM=IEFBR14
> //
> EOF
>

​Nice, thanks. I've made that a GIST for me to remember it. I would, sort
of, prefer to use "cat" because I cannot assume that some other shop will
have Co:Z installed.​



>
>
> if you are truly a "wierdo" -
>
> ​​
> 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
> done
>
>
> Kirk Wolf
> Dovetailed Technologies
> http://dovetail.com
>
> --
The temperature of the aqueous content of an unremittingly ogled
culinary vessel will not achieve 100 degrees on the Celsius scale.

Maranatha! <><
John McKown

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to