Michael, I recall in the past using the NEWJOBQ command to ensure only 1
job with the same name could run at any given time. IIRC, you create a
jobq with the same name as the job, and then set the allowable number of
jobs that could run in the jobq to 1. You then modify the job card in
your JCL to have it log into the jobq of the same name. It's not
glamorous, but it does work, and it's really quick and easy to implement
when the need arises.


NEWJOBQ RAYJOB;LIMIT=1
(Then the JCL job card reads as): !JOB,RAYJOB;JOBQ=RAYJOB


Of course, if you have a COBOL prog that queries its owner (the job that
launched it), then you have a generic solution that should work for all
instances - and that'd be cool.


Have a great T-Day!



-----Original Message-----
From: HP-3000 Systems Discussion [mailto:HP3000-L@RAVEN.UTC.EDU] On
Behalf Of Michael Caplin
Sent: Monday, November 19, 2007 8:02 AM
To: HP3000-L@RAVEN.UTC.EDU
Subject: [HP3000-L] single thread job streams with the same name

I searched the archive looking for something that would prevent multiple
jobs
with the same job name from running at the same time. I found some
solutions but they were not fail-safe so I wrote something that seems to
be
fool-proof. It's a one line command at the front of a stream that
invokes a
command file. The command file runs a small Cobol program. If anyone
has a
use for it, let me know.
Mike

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *