Thanks Stuart.
Yep, it is part of a terminal escape sequence and I actually wrote a
subroutine that I called when this occurred that scanned all of common
for the escape sequence. I only found subsets of the string, and not
the full string that was being inserted into CITEM when the read failed.
Need to use the LOCK conditional on the READU. ELSE is if the record does
not exist. Do a help on READU to get more details.
-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Mecki Foerthmann
Sent: Wednesday, December
Hi
Firstly READU will not execute the ELSE clause when the item is locked.
It will just sit there and wait for the lock to be released.
Regardless if it is a bug or not, your piece of code just doesn't make
sense.
What do you actually try to achieve?
You try to read a record and when it doesn't
Mecki,
Thanks for your ideas and help.
Correct, the READU will stop on a record locked condition which is not
the problem. Also this is not my code, but represents maybe 2000 read
statements that might be in the entire application that assumes that the
CITEM will not be changed if the ELSE
Troy,
The things that stick out to me about this, is that CITEM is a common, it
has changed values and it hasn't been reproduced outside of the 4gl code.
I would look into the common statements of the code surrounding and
including the code that you have isolated this problem to and verify
We are running universe 10.2.10 in pick flavor.
I have a program (part of a 4gl subroutine) that simplified does the
following:
CITEM =
READU CITEM FROM F.FILE, CID THEN
END ELSE
IF CITEM # THEN PRINT CITEM IS NOT NULL!
END
According to the documentation, when running in pick
Does it happen if it's a named common? If it doesn't, then can you make all
your unnamed commons - /noname/ ?
-Original Message-
From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-
boun...@listserver.u2ug.org] On Behalf Of Buss, Troy (Logitek Systems)
Sent: Tuesday, December
Hi Troy
The problem with that code is that the else clause is taken when the record is
locked. You are assuming if the else clause is taken that the record does not
exist, which is not a safe assumption. I would suggest
Readu citem from fv, key locked
* locked options
End then
* then options
Thanks for the replies...
In this example I was using, the ID was not on file, so it would not
have taken the LOCKED clause. I just added the locked clause to my
actual failing code to test the theory and it still takes the ELSE
clause because the record is truly not on file.
I tried George's