mev0003 at unt.edu
Fri Jul 30 17:01:30 GMT 1999
Just out of curiosity, is that COBOL app running on Linux, and if so,
what did you use/do you use to compile/run it?
Also, are you accessing a flat textfile system? Generally, if you're
using a DBMS, the DBMS takes care of locking. And current iterations of
COBOL generally support networking, too. So you could access a DBMS
over the net (like a MySQL db on Linux from your NT box--not sure about
the embedded SQL though--how it works outside the mainframe. Might
depend on the compiler)
For what it's worth, I generally don't have problems opening the same
file from two different applications, which file resides on NT, and is
opened twice from Linux. I haven't tried it the other way around, but
I'll check when I get home.
One thing I've noticed about NT, though, is that only one application
usually has access to a file at a time. I've tried copying an open
file, through Windows Explorer, and it always tells me permission
denied. Novell does the same thing.
One thing you may want to try is to write a little routine (C, perl,
whatever) to check if the file is locked, and CALL that routine from
COBOL, WITH a flag to say if it's locked or not.
But yes, I think your request would be optimal. I think some of the
Office apps will do that--open a file read only, after asking you about
that. It may actually be an application level concern, really, come to
think of it. The app checks if file is locked, and if it is, offers to
open it read-only. Whatever, just my thoughts on the matter.
Hope I managed to give you some ideas, but I'd really be interested in
the COBOL on Linux answer...
Alejandro Flores wrote:
> I have samba runnig on linux (redhat6.0), and Im sharing a cobol
> application that uses some databases tables. The problem is, when a client
> open the program and request a table and other client do the same, the
> system locks up!
> In my view, the 1 client must have read/write access and if
> another client want to access that table, he will get warned that the
> table is locked, and will be prompted to retry if he want to have
> read/write premissions, but if he want only to see the data, he will be
> able to view the table... I tryed:
> kernel oplocks = yes -> With this option, the 2 client can`t
> access the same table.
> oplocks = yes
> Thanks a lot!
Course of Study: http://www.unt.edu/bcis
Visit my Website at http://people.unt.edu/~mev0003
For answers type: perl -e 'print
For 93 million miles, there is nothing between the sun and my shadow
except me. I'm always getting in the way of something...
More information about the samba-technical