HP3000-L Archives

May 2000, Week 1

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:
Russ Smith <[log in to unmask]>
Reply To:
Russ Smith <[log in to unmask]>
Date:
Wed, 3 May 2000 19:02:15 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (55 lines)
Gavin,

Thanks for your help.

> > I have been given a program to debug which is returning a file
> > error 2 (Illegal capability) from its FOPEN procedure on only one
> > of two files being opened by the function.
> You mean that FOPEN returns zero and CCL, and a subsequent call to FCHECK
> returns the error 2?

Yes, the FOPEN returns a filenum of zero, with Status[0]=CCL.  A subsequent
call
to FCHECK returns errCode=2 and Status[0]=CCE.

> > The function (a
> > generic open procedure) is passed the name of the file to open,
> > and a series of options (file attributes, access options, record
> > lengths for build, etc).  Two calls to the function (with
> > parameters identical except for file name) are made back to back.
> Things offhand which would result in this error would be specifying a
> negative file code, or the NOWAIT bit in the AOPTIONS, when not running in
> privileged mode.

aoption.as.no_wait was one of seven items in the foption and aoption
struct's
which had been allowed to default.  Initializing them to the values
specified in
the Intrinsics Manual as default seems to have solved the problem.

> Just because the program has PM capability doesn't mean
> that it is running in PM at the time of the FOPEN call (which would
require
> a call to GETPRIVMODE, or an "option privileged" code segment or procedure
> (details dependent on the language you're using)).

There is no call to GETPRIVMODE in the program, so the program is running
in user mode.

>  But this is almost
> certainly an indication of a program bug rather than a need for even more
> capability.  Sounds like some parameter might not be the right size, etc.

Or defaulting to a value other than expected.

> Are you sure that FOPEN is declared as an "INTRINSIC"?  What language is
it?

Yes there is a "#pragma intrinsic FOPEN" statement at the top of the
program,
which is written in C.


Thanks again,
Rs~

ATOM RSS1 RSS2