I was working on a similar item ["generic" file-opening routines], so I went
through option-by-option in the laserrom documentation, and I seem to recall
that you'll get an "illegal capability" error if you try to open a DIRECTORY
as a "normal" file [and possibly vice-versa if you try to open a "normal"
file "as if" it were a directory] Could it be that the second filename is
really a directory? [or, worse, a "link" file that points to a directory
rather than a real file?
> -----Original Message-----
> From: Erik Vistica [mailto:[log in to unmask]]
> Sent: Wednesday, May 03, 2000 2:17 PM
> To: [log in to unmask]
> Subject: Re: FOPEN Illegal Capability error
>
>
> That is a stumper. Not much in our DB on it. I am *guessing* that an
> FOPEN for 'execute' access may return FSERR 2 if there is
> some conflict.
>
> 1. Could you post the octal values being passed for foptions and
> aoptions?
> 2. Are you sure that the first FOPEN succeeded? (you checked the
> condition
> code is CCE and not just returns fileno=0).
> 3. Did your call to FCHECK succeed? (check that cond-code :-)
>
> Russ Smith wrote:
> >
> > Good afternoon listers,
> >
> > 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. 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. The first is successful. The second
> fails with a file error 2 (illegal capability).
> >
> > The job running the program creates both files, local to
> the execution group. The program is in another group/account
> with (R,L,X:ANY;W,A,S:AC) access and (BA,IA,PM,MR,DS,PH)
> capability. The execution group/account have identical
> setups. The userid which created the program has comparable
> capabilities to the execution userid (differing only that the
> execution user has also CV and UV, i.e. greater capability).
> >
> > I have used LINKEDIT to check the program's capabilities,
> which do not exceed its group or those of the execution
> group. There is no ACD on either file. I am stumped. Under
> what conditions does FOPEN return this error? Any help would
> be appreciated. The archives showed a similar problem last
> year by someone who received this message as a LOAD error,
> pero I cannot find any other reference to this coming from
> *within* a program that is up and running.
> >
> > Thanks,
> > Rs~
> >
> > Russ Smith, Systems Consultant
> > Problem Solved, Vacaville, CA
> > r s m i t h @ c u - h e l p . c o m
> > h p 3 k - l @ e - 3 0 0 0 . n e t
>
|