From: rjohns@brtph46.BNR.CA (Richard Johns P205)
Subject: Re: Bad escape codes on 9000/720?
Reply-To: rjohns@brtph46.BNR.CA (Richard Johns P205)
Organization: Bell-Northern Research Ltd.
Date: Fri, 8 Jan 1993 18:54:47 GMT

Thanks very much to Dennis and Shankar for their help.  Now it's all clear.
I'm still going to whine a little more, though.

In article <31480307@hpcuhe.cup.hp.com>, dhandly@hpcuhe.cup.hp.com
(Dennis Handly) writes:
|> >2.  What's the recommended way of translating the constant
PasErr_600 (which is
|> >    39321792) to 600 so I can look it up in the error message file? 
Do I have>    to write a giant case statement?
|> 
|> You mean you didn't try to do a linear curve fit?  :-)
|> 
|> You just do:  x div hex('10000');  Provided that x mod hex('10000') = 192.

Since the only example in the Pascal Programmer's Guide that shows how to 
report escapecodes *is* a case statement, I feared the worst!

|> >3.  Is there anything useful I can do with the error message catalog,
|> >    /usr/lib/nls/$LANG/pc_msgs.cat?
|> 
|> The file /usr/lib/paserrs is an ascii version of that file.  It states that:
|> $  categories:
|> $    600-799   (4)   run-time errors
|> 
|> Which means that message set 4 contains the errors.

This isn't documented anywhere in the Pascal manuals.

|> >4.  Why isn't any of this explained in the 700 series HP Pascal
Reference or
|> >    HP Pascal Programmer's guide?  One would think it'd be mentioned
with the 
|> >    escape code stuff, at least.  Or under "Error Messages", or something.
|> 
|> This is documented in the Pascal Programmer's Guide in Chapter 11 under
|> ESCAPECODE Function and again under XLIBTRAP intrinsic.  The later
|> show the use of one of these escapecode/errorcodes.
|> 
|> (Both at least mention the name of the file and what it contains.)

No, actually, the escapecode section only mentions file PASESC.PUB/SYS on 
MPE XL.  Please add a pointer to pasesc.ph!  

|> The detailed mapping of the fields is documented in the MPE/iX intrinsic
|> manual and in the Trap Handling Programmer's Guide, 32650-90026 chapter 5.
|> (This manual is mentioned in the Pascal PG, though it's addressed for
|> the MPE/iX audience.)
|> 
|> At one time I was going to change the pasesc.ph file to be more obvious:
|> 
|>  pascal_subsystem = 192;
|>  PasErr_600       = 600 * hex('10000') + pascal_subsystem;
|>  PasErr_HeapExhausted = paserr_600;
|> 
|> Would that be documentation enough?????

Again, no, but it would help.  It would only take a paragraph to explain the 
connection to the error catalog and how decipher the escapecode.  There's a 
whole chapter for Error Recovery and Debugging; why not explain it all?  I'm
not too hot on the idea of ordering and manuals just because they're mentioned
in the Pascal Programmer's Guide, especially when they're MPE/iX manuals and
I'm running HP-UX.

Also, the man page could use another "SEE ALSO" or two.  For instance, to 
catgetmsg and the MPE/iX manuals, especially if that material really isn't 
going to be included with HP-UX documentation.

Cheers,
 Rick Johns
 BNR
 rjohns@bnr.ca

Disclaimer: I said it, BNR didn't.
==============================================================================
==============================================================================
Newsgroups: comp.sys.hp