HP OpenVMS Systemsask the wizard |
The Question is: Dear Wizard, I have batch job that runs from approximately 8:00am to 8:00pm daily that collects Monitor performance statistics. Before shutting down for the night, it resubmits itself for the following day. Occasionally (perhaps 1 out of 20 days), the job fails to restart the next morning. The log file says only this: Error opening primary input file SYS$INPUT File not found KING job terminated at 1-JUN-2000 07:57:25.95 I'm not sure what this error means. It doesn't have a standard error format and the .COM file it is trying to run looks fine. Any thoughts? Thanks Kevin King The Answer is :
The:
Error opening primary input file SYS$INPUT
File not found
error means precisely what it says. The batch procedure was not found.
The most likely cause for this error is that someone (perhaps youself)
has editted the command procedure and purged away the old version.
When you submit a batch job, the queue manager remembers the exact file
which was submitted, using the File ID (FID), NOT the name. This is a
security feature to ensure that only the file which was submitted will
run. So even if there is a procedure with the same name (even the same
version number) as the originally submitted procedure, if the original
file has been deleted, the job will fail and the above message written
tothe log file. If you modify the procedure, you will have to delete the
existing batch queue entry and resubmit the new procedure.
For jobs which resubmit themselves, you may want to be able to modify
the procedure and have the new version used the next time the job is
submitted. The following DCL will submit the latest version of the
currently executing procedure to execute at 8am the following day:
$ ThisProcedure=F$ELEMENT(0,";",F$ENVIRONMENT("PROCEDURE"))
$ SUBMIT/AFTER="TOMORROW+0-8:00" -
'ThisProcedure' -
/PARAM=("''p1'","''p2'","''p3'","''p4'",-
"''p5'","''p6'","''p7'","''p8'")
Another solution variation possible involves submitting a stub DCL
command procedure, a procedure which invokes the "real" procedure and
that also resubmits itself. The contents of this "stub" procedure are
deliberately kept simple, and are thus not modified. The "real" DCL
procedure can be modified, and the most current version will be invoked
when the batch job -- the stub procedure -- runs.
|