Main Menu

KB#00364-Error 0, TCB(10)=-33, when opening a file twice via different names or cases

Title:

Error 0, TCB(10)=-33, when opening a file twice via different names or cases

Description:

When PRO/5 asks the DOS/Windows/Novell operating system to open up the second file, the operating system doesn't let PRO/5 know that it's really the same file (as does under other operating systems). Therefore, PRO/5 acts as if two users are trying to open the same file, when they each are running a single-user version. This results in the lock violation error. Releases prior to 1.04 exhibit this behavior.

Resolution:

With the release of 1.04, PRO/5 has a new setopts bit that will affect its behavior. Here's how it's documented in the readme: 
=================================================================== 
* On single-user Visual PRO/5 products an !ERROR=0 occurs when a file open attempt is made to a file that was already opened on another channel, but the path to the file was different. For example: 

OPEN(1)"file" 
OPEN(2)"./file" 

The OPEN(2) will fail with an !ERROR=0. This has been corrected in Revision 1.04 through the use of a new SETOPTS bit. 

The new bit is Byte 7 Bit 1. When this bit is set, Visual PRO/5 behaves in the same manner as the PRO/5 UNIX ports. For example: 

OPEN(1)"file" 
OPEN(2)"./file" 

share the same FCB which prevents an extra user slot being taken on the file and the !ERROR=0 for single user product. The FID() information is that of channel 1 in this case. The file name reported at offset 9 in FID(2) is exactly the same as that of FID(1) (i.e. "file"). Had channel 2 been open first the file name info in the FID(1) would be "./file". 

As a result of this correction, multiple channels to the same opened file use a single FCB. 
=================================================================== 
Here's an example in action: 

READY 
>open(1)"c:\temp\99.bbx" 
>open(2)"C:\TEMP\99.BBX" 

!ERROR=0 (Busy or not ready (tcb(10)=-33)) 
>END 

READY 
>SETOPTS $00000000000001$ 
>open(1)"c:\temp\99.bbx" 
>open(2)"C:\TEMP\99.BBX" 



Last Modified: 07/27/1998 Product: Visual PRO/5 Operating System: MS Dos WindowsError Number: OS Error: 33

BASIS structures five components of their technology into the BBx Generations.

  Google+ View BASIS LinkedIN ProfileVisit our Twitter Feed Check out our Facebook Public Profile Click to View the BASIS youTube channel