[U2] OPENSEQ and the LOCKED Option

2011-10-28 Thread Al DeWitt
Unidata 7.1.20 ECLTYPE P

 

Whenever I try to include the LOCKED option in the OPENSEQ statement my
test 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
other appears hung...no message, nothing.  When the first user closes
the file the second user continues on.

 

Since LOCKED appeared to allow me to tell the other users that the file
is locked and not to give up hope what do you folks do to get around
this dilemma?

 

Thanks.

 

Al

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] OPENSEQ and the LOCKED Option

2011-10-28 Thread Wjhonson

Please provide the exact source, and the exact compilation error message




-Original Message-
From: Al DeWitt adew...@stylmark.com
To: u2-users u2-users@listserver.u2ug.org
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
2-us...@listserver.u2ug.org
ttp://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] OPENSEQ and the LOCKED Option

2011-10-28 Thread Colin Alfke
I've usually only used it where I expect one user to be accessing the file
at a time anyway. However, it should (mine does on UD 7.1.6) compile. You
are using an END before the next THEN or ELSE - that might do it.

hth
Colin Alfke
Calgary, Canada

-Original Message-
From: Al DeWitt

Unidata 7.1.20 ECLTYPE P

Whenever I try to include the LOCKED option in the OPENSEQ statement my
test 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
other appears hung...no message, nothing.  When the first user closes
the file the second user continues on.

Since LOCKED appeared to allow me to tell the other users that the file
is locked and not to give up hope what do you folks do to get around
this dilemma?

Thanks.

Al


___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] OPENSEQ and the LOCKED Option

2011-10-28 Thread Al DeWitt
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: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
Sent: Friday, October 28, 2011 4:39 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] OPENSEQ and the LOCKED Option


Please provide the exact source, and the exact compilation error message




-Original Message-
From: Al DeWitt adew...@stylmark.com
To: u2-users u2-users@listserver.u2ug.org
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
2-us...@listserver.u2ug.org
ttp://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] OPENSEQ and the LOCKED Option

2011-10-28 Thread Colin Alfke
You need to change line 6 to END ELSE (to end the locked clause)

-Original Message-
From: Al DeWitt

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


___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] OPENSEQ and the LOCKED Option

2011-10-28 Thread Al DeWitt
That did it!

Thank you very much.

Al DeWitt


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Colin Alfke
Sent: Friday, October 28, 2011 5:01 PM
To: 'U2 Users List'
Subject: Re: [U2] OPENSEQ and the LOCKED Option

You need to change line 6 to END ELSE (to end the locked clause)

-Original Message-
From: Al DeWitt

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


___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users