Closing a file apparently releases all the locks. There's an implied close in 
read_prog, therefore the lock gets released.

To fix it, you need to remove the OPEN in read_prog, either by opening the file 
in COMMON or passing the file pointer as an argument.

Yup, I agree that behaviour *might* be broken, but then again it might not. 
There's arguments both for and against.

Cheers,
Wol

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bjorn Behr
Sent: 18 September 2008 12:05
To: u2-users@listserver.u2ug.org
Subject: [U2] Universe Lock Error

Morning All

We are running on UV 10.2.11 and have encountered an error.

Scenario:

 PROGRAM MAIN_PROG
 OPEN "FILE" TO FILE ELSE STOP 201,"FILE"
 CALL READ_PROG
 CRT "YOU SHOULD BE HERE...":
 INPUT X
 RELEASE FILE, "TESTER"

 PROGRAM READ_PROG (A)
 OPEN "FILE" TO FILE ELSE STOP 201,"FILE"
 READU REC FROM FILE, "TESTER" ELSE REC = ""
 REC<1> = 1
 WRITEU REC ON FILE, "TESTER"
 RETURN

 PROGRAM READ_PROG (B)
 OPEN "FILE" TO FILE ELSE STOP 201,"FILE"
 READU REC FROM FILE, "TESTER" ELSE REC = ""
 RETURN

 With both Program (A) and (B) when READ_PROG returns to MAIN_PROG it releases
the Record Lock before the release.

 Has anybody else encountered this, is there a way to fix it (Work Around /
Setting etc...)

Regards
Bjvrn Behr
SUMMIT CORE Developer
Tel No: +27 12 673 3251
Fax No: +27 12 673 4681
E-Mail: [EMAIL PROTECTED]

[demime 1.01d removed an attachment of type text/x-vcard which had a name of 
Bjorn Behr.vcf]
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to