HP3000-L Archives

March 2001, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Stan Sieler <[log in to unmask]>
Reply To:
Stan Sieler <[log in to unmask]>
Date:
Wed, 28 Mar 2001 18:54:16 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (40 lines)
Re:

> HPCIPUTVAR and HPCIGETVAR return a 32bit signed integer status. But to interpret it you have to access it as two 16bit integers. One 16bit integer is the error code and the other is the subsystem identifier.
>
> Question 1:
> How do I interpret the 32bit integer as two 16bit integers in COBOL.
>
> Question2:
> Where can I find what the error integers mean once I successfully get them in COBOL. The Intrinsic Manual says to look at the Error Message Manual but the Error Message Manual doesn't have info for subsysytem 166 (HCIGETVAR & HCIPUTVAR).


You can simply interpret it as a signed 32-bit integer, if you prefer:

   value < 0     --> error

   value = 0     --> no error, no warning

   value > 0     --> warning

You can convert a 32-bit status value into an error message with
the HPERRMSG intrinsic.  I haven't called it from COBOL, but the
basic form you want is:

   hperrmsg (2, 1, , status, , , altstatus);

As a guess in COBOL, I'd use

   01 STATUS    PIC S9(9) COMP.
   01 ALTSTATUS PIC S9(9) COMP.

   ... HPCIGETVAR ... STATUS ...

   CALL INTRINSIC "HPERRMSG" USING 2, 1, 0, STATUS, 0, 0, ALTSTATUS

(ALTSTATUS returns the  result of HPERRMSG...I usually ignore it)


Stan Sieler                                           [log in to unmask]
www.allegro.com/sieler/wanted/index.html          www.allegro.com/sieler

ATOM RSS1 RSS2