How can I test for errors in QTP and QUIZ in a job stream?
Leonard Berkowitz
Leonard_Berkowitz@tufts-health.com
Mon, 10 May 1999 07:06:34 -0400
That's a good idea, but is not correct HP3000 syntax:
DEV:SETJCW QUIZ=0
DEV:IF JCW(QUIZ)=0 THEN
^
An operator was expected, but none was found. (CIERR 9757)
The correct syntax for testing a JCW is:
:IF QUIZ=0 THEN
: whatever
:ENDIF
However, this method is not bulletproof (unless QUIZ handles certain exceptional
conditions differently now from a few years ago). Overflowing a subfile in QUIZ, will
cause a "*W*" condition and no JCW will be set. Thus there is nothing for which to
test.
In MPE/ix, you can test the EOF and file limit with the FINFO function. If they are
the same, there is a high probability that the subfile was too small.
For example:
IF FINFO ("subfile","EXISTS"), THEN
IF FINFO ("subfile","FILE LIMIT") = FINFO ("subfile","EOF") THEN
TELLOP !HPJOBNAME #J!HPJOBNUM has a subfile overflow problem.
TELLOP !HPJOBNAME #J!HPJOBNUM will now abort
ESCAPE
ENDIF
ENDIF
It's important to test the EOF and FILE LIMIT under the aegis of checking for the
existence of the file itself because the other FINFO functions will cause errors if
the file is absent. There are numeric values for the mnemonics, EXISTS, EOF, and FILE
LIMIT - 0, 19 an 12 respectively, but the mnemonics are self-documenting.
========================
Leonard S. Berkowitz
mailto:Leonard_Berkowitz@tufts-health.com
phone: (617) 972-9400 ext. 3250
fax: (617) 923-5555
Michael Lee <mcl_systems@bc.sympatico.ca> on 05/07/99 03:49:09 PM
Please respond to mcl_systems@bc.sympatico.ca
To: Abraham Zwygart <azwygart@anodizing.com>, powerh-l@lists.swau.edu
cc: (bcc: Leonard Berkowitz/THP)
Subject: Re: How can I test for errors in QTP and QUIZ in a job stream?
Sorry got a phone call during the earlier message and didn't have time to provide
a code sample. If you set a job stream up like the following one it should help:
!JOB ...
!SETJCW QUIZ = 0
!QUIZ AUTO=myprog.QZC
!IF JCW(QUIZ) = 0
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
powerh-l@lists.swau.edu is gatewayed one-way to bit.listserv.powerh-l
This list is closed, thus to post to the list, you must be a subscriber.