HP3000-L Archives

November 2001, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Tom Emerson <[log in to unmask]>
Reply To:
Tom Emerson <[log in to unmask]>
Date:
Fri, 2 Nov 2001 17:21:26 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (80 lines)
On Fri, 2 Nov 2001 16:32:13 -0500, Derrick Tietz <[log in to unmask]> wrote:

>Hello all,
>Is it possible to imitate scheduling software using the stream command? I
want a job to run every day at 8:30 PM without having to stream it daily. I
tried streaming Job1 at=20:30, job1 streams Job2 in=,1 and Job2 streams
Job1 in=,23. I also tried using "at" instead of "in" in Job1 and Job2. Is
it possible to make this work?     When I try this I get a long list of the
jobs that repeat, but I never get a JOBNUM.
>Thanks in advance,
>Derrick

The key phrase you have here, "I get a long list of the jobs that repeat,
but never a jobnum", implies you are using Vesoft's STREAMX product -- MPE
by itself does not look into the contents of a job to see if other jobs are
submitted [err, at least, it used to not look into them...]  Streamx does
this because it is looking for embedded jobs where you (the submitter)
might need to supply passwords or other data upon request.

If that's the case, take a look into Vesoft's STREAMX scheduling
capabilities (most likely discussed as part of BACKG, the "background"
job).  Streamx scheduling allows a ;REPEAT option to cause jobs to repeat,
BUT THERE ARE SOME CAVEATS!

Namely, once submitted, the job cannot be changed for the next day.
Generally this isn't a problem if the job is straightforward OR relies
soley upon MPE variables.  However, constructs like the following would
fail:

   !job daily,mgr.acct
   !run myprog;info="{today}"
   !eoj

because when you submit this, STREAMX processes the curly-braced
substitution and saves the result in the file that eventually gets
submitted at the time you desire.  The next day, that SAME pre-processed
file is re-submitted, "{today}" no longer exists, so it cannot be re-
evaluated!  (and worse, it now refers to "yesterday")

The solution (kludgy that it may be) is to submit a "wrapper" job that
contains something like this:

   !job dailyw,mgr.acct
   !file strmfile=daily.jcl.acct
   !run main.pub.vesoft,streamx;parm=%1
   !eoj

This "outer" job then physically evaluates the contents of DAILY.JCL.ACCT
to process curly-braced items AT THE TIME THE JOB RUNS, not at the time
you "submit" the dailyw jobstream.

By explicitly RUNNING streamx, you avoid Streamx's propensity to search out
& include subordinate jobstreams...  (see also setting the variable
STREAMXPERMNONEST & STREAMXTEMPNONEST)

But, back to the scheduling options:

Check into the ";WHENEVER" keyword -- this allows you to submit a job based
upon a CONDITION, rather than a specific time-of-day (although the time of
day CAN be a condition!)  For instance, I have a job that must "always" be
running, so the command:

   :STREAM CORONER.JOB.SYS;WHENEVER=(JSCOUNT("CORONER,MANAGER.SYS")
<1);CHECKEVERY=1

causes MPEX to submit the "coroner" job whenever it detects it isn't
running.  The "checkevery" clause causes it to check once per minute
[however, check this to be certain -- I cannot remember offhand if this
parameter is specified in seconds or not...]

This is really useful for those annoying "synch up with FTP" type jobs --
now you can use:

   :stream PROCESS.DATA.FILE;WHENEVER=FEXISTS("INBOUND.FTP.FILE")

(again, modify with ;CHECKEVERY to suit your needs)

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

ATOM RSS1 RSS2