I've struggled with the compound END/END's in this case and may offer a
different view:

READU REC FROM FILE, ID LOCKED LTE=1 THEN LTE=2 ELSE LTE=3

And then I process the LTE flag accordingly in code separated from the
READU.

One of my clients has manual record locking (SAS) with no READU's and we're
trying to improve it. At present the manual method writes a '1' on attr 1 of
the data record to indicate that it's checked out. There is localized logic
to advise the 2nd user of the lock (but not who owns the lock).

Thus, the original holder may accidentally come across his own lock. Plus,
they need a separate CLEAR-LOCKS program to clean up any latent lock '1'.

My LTE method above allows for any SLEEP or info to try again.

my 1 cent.

----- Original Message -----
From: "Kryka, Richard" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, October 29, 2004 5:48 PM
Subject: RE: [U2] READU ... THEN _or_ ELSE but not both?


> I like this format:
>
> READU RECORD FROM FILE, ID LOCKED
> ....
> END THEN
> ....
> END ELSE
> ....
> END
>
> Dick Kryka
> Director of Applications
> CCCS of Greater Denver, Inc.
> Paragon Financial Services
> 303-632-2226
> [EMAIL PROTECTED]
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Wendy Smoak
> Sent: Friday, October 29, 2004 3:08 PM
> To: [EMAIL PROTECTED]
> Subject: [U2] READU ... THEN _or_ ELSE but not both?
>
> From the documentation:
>
> READU dyn.array.var FROM [file.var,] record.ID.expr [LOCKED statements]
> [ON ERROR statements] {THEN statements [END] | ELSE statements [END]}
>
> Am I reading this right?  When I READU I can either have a THEN or an
> ELSE, but not both?  (That it does not compile with both tends to
> confirm that...)
>
> er.u2ug.org/
> -------
> u2-users mailing list
> [EMAIL PROTECTED]
> To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to