Subject: | |
From: | |
Reply To: | |
Date: | Thu, 29 Mar 2001 11:55:00 -0800 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Re:
> To clarify, your status field can be defined thus
>
> 5 LIGP-ERROR PIC S9(9) COMP SYNC.
> 5 FILLER REDEFINES LIGP-ERROR.
> 7 LIGP-ERROR-1 PIC S9(4) COMP SYNC.
> 7 LIGP-ERROR-2 PIC S9(4) COMP SYNC.
My point is that you don't need, and usually don't want, to
know about the two component parts of the "HPE_STATUS" value
(the 32-bit status returned by HPCIxxxVAR). Simply treating
it as a 32-bit integer is fine.
If you *did* want to see the component parts, use:
LIGP-STATUS PIC S9(9) COMP SYNC.
FILLER REDEFINES LIGP-ERROR.
LIGP-INFO PIC S9(4) COMP SYNC.
LIGP-SUBSYS PIC S9(4) COMP SYNC.
* INFO < 0 means error, INFO = 0 means ok, INFO > 0 means warning
As Tony pointed out, for calls to HPCIxxxVAR, the subsystem
number returned will almost always be 0 or 2 (0 for no err/no warn,
and 2 for CI errors/warnings). However, I'd almost never use
that knowledge. What you want to know is: did the intrinsic
return an error (status < 0), a warning (status > 0), or "ok"
(status = 0). In the first two cases, you have to decide: do you
want to generate a nice error message? If so, you need to use
HPERRMSG, passing it the full 32-bit status.
I defined the extra "ALTSTATUS" to hold the status returned
by HPERRMSG:
> 01 ALTSTATUS PIC S9(9) COMP.
Stan Sieler [log in to unmask]
www.allegro.com/sieler/wanted/index.html www.allegro.com/sieler
|
|
|