I am looking at a problem job. It runs a program, which can fail with a
particular error message. This same program can also gracefully exit, giving a
different message on normal exit. When this job ends prematurely due to the
program failing, that's a bad thing, but as soon as someone is aware of it
(usually because the affected users call us), we simply restream the job.
Since fixing the problem with the program would require quite a bit more work, I
am looking at trying to have the job read the line with the program's last
message from its own stdlist. Presumably, the program's last message will be
some small number of lines from the end of the stdlist, skewed by whatever code
I add around the execution of the program. This program produces thousands of
lines of messages, so redirecting the output into a temp file is not a favored
solution.
I think that what I need to do is use HPJOBNUM to determine the spool id, then
capture the FINFO EOF of said stdlist, subtracting my offset, PRINT
START=!MSGLINE END=!MSGLINE>TEMPFILE, INPUT MESSAGE < TEMPFILE, and
appropriately handle the resulting value of MESSAGE.
Is that about right?
Greg Stigers
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|