Operating System - OpenVMS
1754129 Members
3706 Online
108811 Solutions
New Discussion юеВ

Pathworks File Open Flags

 
Douglas Buxton
Advisor

Pathworks File Open Flags

We have and application that is being upgraded to 3-tier client Server. The client is Windows based and the applications server is OpenVMS based. To access process log files and application code include files, Pathworks is used. However, they want to be able to access the same file by a process and a user at the same time, meaning it has to be opened Read-Only. I have not been able to find any documentation of method to specify opening in read-only mode. Has anyone ever run into anything like this before?

BTW I've been on the forum every day since I joined (almost 7 months) and I've never had to opportunity to answer a question. You guys are just too quick!
9 REPLIES 9
Kris Clippeleyr
Honored Contributor

Re: Pathworks File Open Flags

Hi,

Although it's not to clear to me what you mean by

access the same file by a process and a user at the same time

I presume that "process" means "executable running in the context of a process" and "user" means "interactive session"?
If that is the case, then from e.g. a C program you can open the file with something like:

fptr = fopen(fname,"r","shr=get");

and from DCL with something like:

OPEN/READ/SHARE=READ infile filespec

Hope this helps.

Greetz,

Kris (aka Qkcl)
I'm gonna hit the highway like a battering ram on a silver-black phantom bike...
Douglas Buxton
Advisor

Re: Pathworks File Open Flags

You are correct, sort of. The file is being opened by a VMS detached process, and by a client. The client opens in include file and parses the code prior to submitting the job as a detached process in VMS. The problem turns out to be (just found this out) that the file is not closed fast enough (i.e. before the detached process starts and tries to open it) by Pathworks after the client parsing. The solution may be as easy as putting a higher priority on the SERVER Pathworks process to handling closing the file faster.
Kris Clippeleyr
Honored Contributor

Re: Pathworks File Open Flags


Hi again,

I think you have a "serialization" problem here.


The solution may be as easy as putting a higher priority on the SERVER Pathworks process to handling closing the file faster.


or building in a "delay" in the client so the detached process is started somewhat later?

Greetz,

Kris (aka Qkcl)
I'm gonna hit the highway like a battering ram on a silver-black phantom bike...
Douglas Buxton
Advisor

Re: Pathworks File Open Flags

They put in a 3 second delay in the submission of the detatched process and that solved the problem in the test environment. However, in production, 350 users could easily create enough jobs that multiple clients and/or detathed processes could attempt to open common include files. The programmers indicate that the files are being opened in read mode, but there apparently isn't a shr= mode for windows only for robust systems like VMS.
Kris Clippeleyr
Honored Contributor

Re: Pathworks File Open Flags

Douglas,

I'm sorry that I can't be of any further assistance. My knowledge of programming on a Windows environment is limited to say the least.
Maybe you can try your luck in a Windows forum?

Greetz,

Kris (aka Qkcl)
I'm gonna hit the highway like a battering ram on a silver-black phantom bike...
Edwin Gersbach_2
Valued Contributor

Re: Pathworks File Open Flags

When you configured Advanced-Server after the installation - which you can do again using ADMIN/CONFIG - there was a advanced configuration parameter named "Open File Caching Interval (msec):" with a default of 5000 along with a checkmark to turn caching on or off alltogether.

The idea behind this is, to keep a file open for a certain amount of time when the windows client closes it, because many window programs do repeated file open and closing. Some scripting interpreters for example do a open/close sequence for every single line to be read.

Of course this time becomes longer due to the already mentioned delays.
Antoniov.
Honored Contributor

Re: Pathworks File Open Flags

Douglas,
I'm with Edwin, may be a cache time-out. However, without cache time-out your server application may degrade its performance.
You have to find the best compromise.

Antonio Vigliotti
Antonio Maria Vigliotti
Paul Nunez
Respected Contributor

Re: Pathworks File Open Flags

Hi,

You can disable the PATHWORKS Open File Cache w/o much consequence with one notable exception - if clients execute DOS batch files stored on the server, which includes NETLOGON scripts, you may want to compare the performance before and after disabling the cache to determine if the degradation is acceptable.

DOS batch file processing involves opening the file, reading the next line, closing the file, and executing the command - for every line in the batch file. So the open file cache can greatly benefit clients that execute batch files stored on the server. But you can typically reduce the open file cache time interval from 5 seconds to 2 or maybe even 1 (1000 ms).

HTH,

Paul
Antoniov.
Honored Contributor

Re: Pathworks File Open Flags

Hi Pail,
your informations about pathwork are again golden eggs!
Thank you!

Antonio Vigliotti
Antonio Maria Vigliotti