Why is my Job Suddenly Failing?
I had a recent call in to support asking why all of a sudden some jobs started failing in a job stream. The report was a blank line after run of a program suddenly started giving the error:
Missing colon before command name. (CIERR 981)
In previous incarnations the job stream with the blank line would NOT fail but nothing changed... of course. :)
First off I want to confirm that a blank line does abort a job stream.
:comment bland line is next Missing colon before command name. (CIERR 981) REMAINDER OF JOB FLUSHED. CPU sec. = 1. elapsed min. = 1. THU, FEB 4, 2010, 10:47 AM.And I found it does.
The customer though showed that the blank line was after the run of a program and in this case I am using query as an example. We didn't see the same behaviour. Odd.
:comment :comment test blank line after run query.pub.sys :comment :purge file1x :query HP32216N.03.18 QUERY/NM THU, FEB 4, 2010, 10:18 AM COPYRIGHT HEWLETT-PACKARD CO. 1976 exit END OF PROGRAM :showjcw jcw JCW = 0 :showjcw cierror CIERROR = 0 :eoj CPU sec. = 2. elapsed min. = 1. THU, FEB 4, 2010, 10:18 AM.Some investigation and some clues from something I had remembered investigating in 2001 allowed me to duplicate by switching to query being run/resolved via a command file.
In the above example even though the commands were the same, query was being run via path resolution. This is the part that was tricky and I later make the examples explicit by specifically running query.pub.sys or using my query command file:
:comment :comment Blank line after query which resolves to a command file :comment :query HP32216N.03.18 QUERY/NM THU, FEB 4, 2010, 10:20 AM COPYRIGHT HEWLETT-PACKARD CO. 1976 exit END OF PROGRAM Missing colon before command name. (CIERR 981) REMAINDER OF JOB FLUSHED.Another example but this time with garbage commands:
:comment query command file with garbage after exit :query HP32216N.03.18 QUERY/NM THU, FEB 4, 2010, 10:44 AM COPYRIGHT HEWLETT-PACKARD CO. 1976 exit END OF PROGRAM yabba dabba doo Missing colon before command name. (CIERR 981) REMAINDER OF JOB FLUSHED. CPU sec. = 2. elapsed min. = 1. THU, FEB 4, 2010, 10:44 AM.Now I switched back to running directly with the yabba dabba doo still in the job and some other lines:
:comment :run query.pub.sys HP32216N.03.18 QUERY/NM THU, FEB 4, 2010, 10:45 AM COPYRIGHT HEWLETT-PACKARD CO. 1976 exit END OF PROGRAM :showjcw jcw JCW = 0 :showjcw cierror CIERROR = 383 :eoj CPU sec. = 2. elapsed min. = 1. THU, FEB 4, 2010, 10:45 AM.In the case of a run of the program file the garbage lines after the run are being read as $stdin until it sees a "!". So what happens is the program exits and the extra lines left in the stdin are thrown away.
However, if you switch this run to a command file, suddenly the job stops running to completion.
So, if you have a customer that switches from say
query
which is run thru HPPATH resolution, to having
query
be resolved via a command file, the jobs with blank lines or garbage after the exit line will suddenly stop failing.
It's a bit tricky to diagnose especially if the customer doesn't believe you or points to something else. I have not tested UDC's but I would believe that they would have the same behaviour. My guess is that when a command file ends MPE just reads the next line in the job stream, but when a program ends the job stream is trying to re-orient itself in regard to stdin and just reads until is sees a "!". That is the behaviour that I am seeing.
Any past labbies or gurus care to comment or have thoughts.
No comments:
Post a Comment