Here is my admittedly simple test program and the results:
001: IMPORT.FILE = "FILE_IN.CSV"
002: CLOSE.IT = 1
003: OPENSEQ "DELTAIMPORT",IMPORT.FILE TO FILEIN
004: LOCKED
005: CRT 'FILE IS LOCKED BY SOMEONE ELSE' ; DUMMY='' ; INPUT DUMMY
006: ELSE
007: ERR.CD = STATUS()
008: CRT 'ERROR CODE=':ERR.CD ; DUMMY='' ; INPUT DUMMY
009: CLOSE.IT = 0
010: END
011: IF CLOSE.IT THEN
012: CRT 'HOORAY, FILE_IN IS OPENED' ; DUMMY='' ; INPUT DUMMY
013: CLOSESEQ FILEIN
014: END
015: END
*--: FIB
Filed "ALD1" in file "BP".
Compiling Unibasic: ..\..\..\FLOPROGS\DEV\DEV.IIBASE8\BP8.0\ALD1 in mode
'p'.
main program: syntax error at or before
<line 16> <EOF>
^
Expecting: ELSE
compilation failed
It works fine if I take out lines 4 - 5.
Al DeWitt
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Wjhonson
Sent: Friday, October 28, 2011 4:39 PM
To: [email protected]
Subject: Re: [U2] OPENSEQ and the LOCKED Option
Please provide the exact source, and the exact compilation error message
-----Original Message-----
From: Al DeWitt <[email protected]>
To: u2-users <[email protected]>
Sent: Fri, Oct 28, 2011 2:21 pm
Subject: [U2] OPENSEQ and the LOCKED Option
Unidata 7.1.20 ECLTYPE P
Whenever I try to include the LOCKED option in the OPENSEQ statement my
est program does not compile. If I leave it out it does compile.
When two users run this program one executes the OPENSEQ command and the
ther appears hung...no message, nothing. When the first user closes he
file the second user continues on.
Since LOCKED appeared to allow me to tell the other users that the file
s locked and not to give up hope what do you folks do to get around his
dilemma?
Thanks.
Al
_______________________________________________
2-Users mailing list
[email protected]
ttp://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users