No announcement yet.

Who has this file open

  • Filter
  • Time
  • Show
Clear All
new posts

  • Who has this file open

    I have a program that runs on a network, some win98 and some dos boxes.

    I use the network software from

    Everything works fine, however if my program leaves a file open, I have to shut down the server and restart all the other machines on the network.

    To enable better dubug of my code, I need to know which computer has left a file open.

    Can this be done ?


  • #2
    Not in answer to your question, but to help get one ..

    What you are saying is that you have a file left open on the
    server? I think that is what you are saying. Next, is that file
    a shared file? In other words, does your software permit more
    than one person to access the file at a time using the PB file
    open functions which include SHARED? Or are you saying that the
    file in question is on the server, it is not a shared file, your
    program has it open, has been aborted some way, leaving the file
    "open", but now 'ownerless' on the server?

    Or, are you saying that your program is operating on the network
    and you have a ffile open on your workstation. It isn't closed,
    and yet when you leave or are tossed off the network, even though
    your file is local to the workstation, the server still abends?
    Don't laugh, folks who are just reading along. Without knowing
    the exact capabilities of the network, it might be that this
    network has auditing capabilities and the code he has written is
    set up to provide for that!

    Further, are you using not a pure PowerBASIC file operation, but,
    perhaps some other file operations, such as Btrieve? And, if you
    are using, for example, Btrieve, are you loading an individual
    instance of Btrieve as an engine at each workstation, letting the
    server hold just the raw Btrieve common accessed file, or are you
    using the server-client version with the Brequester?

    Some networks are very, very fussy about even any kind of an abended
    loggin without proper close. Some are not.

    I probably can't help you at all, running OS/2 and Network-OS for
    DOS in most of my remaining DOS based systems. But to help you best
    defining all this up front in your help post will likely get you
    help faster!

    I looked at the URL you posted. Your post makes a FINE point as
    to why DOS is a *LONG LONG* way from being dead. There are a
    whole host of people who do not realize just how important DOS
    still is in the world of embedded small systems. Yes, folks,
    386-486 class boxes with only a few megs of memory are still all
    it takes to run elevators, 'fridges, small toys, you name it.
    PowerBASIC for DOS is a WONDERFUL tool for small systems..

    Mike Luther
    [email protected]
    Mike Luther
    [email protected]


    • #3
      I suggest that you ask Otex - finding out the "owner" of an open file is likely to be a function of the networking software...

      There was some code floating around for this type of function for Novell LAN software, but I would doubt it would work for Otex, as it used the proprietary Novell API functions...

      Have you tried the approach of writing some kind of log file to track usage? For debugging purposes, it just may provide the level of help you need.

      Good luck!

      PowerBASIC Support
      mailto:[email protected][email protected]</A>
      mailto:[email protected]