* Re: Question for Vax experts
[not found] <65vi27$4mb@nr1.calgary.istar.net>
@ 1997-12-02 5:00 ` Joshua Cope
1997-12-02 5:00 ` Chuck McCrobie (** MAD VAX **)
1 sibling, 0 replies; 2+ messages in thread
From: Joshua Cope @ 1997-12-02 5:00 UTC (permalink / raw)
Brad Hawken wrote:
>
> My question is, what "keywords = what values" should be used in order to
> make the newly created file sharable (I think that is the vax lingo).
> Essentially creat(e) the file so that once a file is created calling open()
> again to retrieve a new file descriptor doesn't give the error
> "65535 file currently locked by another user"
Files are opened as shareable by specifying the attributes in each
call to open(), etc. from your application. You can't create a file
and mark it as "always open this file shareable"; the application which
opens the file specifies what kind of sharing it wants.
If you have the full documentation set, take a look at the
"Guide to OpenVMS File Applications", which describes the FAB fields
and values. If not, you can either look in FABDEF.H or use
"HELP RMS FAB" to see the list. In particular, the SHR (FAB$B_SHR) field
is used to specify file sharing attributes on file creation or access.
Try adding "shr=get" to your create and open calls for shared read
access,
"shr=put" for shared write access, etc.
------------------------------------------------------------
The above opinions and information are my own, and not
necessarily those of Digital Equipment Corporation.
------------------------------------------------------------
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Question for Vax experts
[not found] <65vi27$4mb@nr1.calgary.istar.net>
1997-12-02 5:00 ` Question for Vax experts Joshua Cope
@ 1997-12-02 5:00 ` Chuck McCrobie (** MAD VAX **)
1 sibling, 0 replies; 2+ messages in thread
From: Chuck McCrobie (** MAD VAX **) @ 1997-12-02 5:00 UTC (permalink / raw)
Brad Hawken wrote:
>
> I've written some applications in C on Unix and now I have to port them to
> the Vax (which I know nothing about I'm afraid).
>
> Mostly I'm done however I have run into the problem on the vax where once a
> file has been opened using the system routines open or creat I cannot access
> these files with with other calls to open from within the same process or
> even read the files externally (i.e. with TYPE). This is required since
> this application is a logging API that will append, recreate, write, etc to
> a file from within any other application.
>
> My question is, what "keywords = what values" should be used in order to
> make the newly created file sharable (I think that is the vax lingo).
> Essentially creat(e) the file so that once a file is created calling open()
> again to retrieve a new file descriptor doesn't give the error
> "65535 file currently locked by another user"
>
> Thanks in advance for any help on this.
If you have access to the DEC C Run-time Manual, the "keyword=value"
information is listed in the "creat" call. You may want to try the
following keyword(s):
"shr=put" - allows users to write
"shr=upd" - allows users to update
"shr=get" - allows users to read
"shr=upi" - allows one or more writers
I have not used the last option, but it sounds reasonable. There may be
other relevant options...
You will want to get the DEC C Runtime Manual and possibly the VMS
System Services Manual and perhaps the RMS Manual.
Chuck McCrobie
--
ALL OPINIONS DO NOT NECESSARILY REFLECT THOSE OF MY EMPLOYER.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1997-12-02 5:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <65vi27$4mb@nr1.calgary.istar.net>
1997-12-02 5:00 ` Question for Vax experts Joshua Cope
1997-12-02 5:00 ` Chuck McCrobie (** MAD VAX **)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox