Hi all,

 

One of the programmers here has noticed this quirky behaviour in Unidata
7.1.

 

First, we created a file called TEST and gave it 3 records, AA, AB and
AC. Then we executed the following program:

 

   PROGRAM TEST

   

   CLEARSELECT

   EXECUTE 'SELECT TEST WITH @ID = "A]"' 

   CRT "Records after SELECT ":SYSTEM(11)

   

   READNEXT KEY ELSE NULL

   

   EXECUTE "CLEARSELECT"

   CRT "Records after EXECUTE CLEARSELECT: ":SYSTEM(11)

   

   EXECUTE 'SELECT TEST WITH @ID = "A]"'

   CRT "Records after SELECT ":SYSTEM(11)

   

   READNEXT KEY ELSE NULL

   

   CLEARSELECT

   CRT "Records after CLEARSELECT: ":SYSTEM(11)

   

   EXECUTE 'SELECT TEST WITH @ID = "A]"'

   CRT "Records after SELECT ":SYSTEM(11)

   

   STOP

 

and received the following results:

 

3 records selected to list 0.

 

Records after SELECT 3

Records after EXECUTE CLEARSELECT: 2

 

3 records selected to list 0.

 

Records after SELECT 2

Records after CLEARSELECT: 0

 

3 records selected to list 0.

 

Records after SELECT 3

 

We would expect SYSTEM(11) to return 0 after the EXECUTE "CLEARSELECT"
but it returns how many items were in the list prior to the CLEARSELECT.
Also odd is that the select itself returns that it selected 3 records,
but then SYSTEM(11) reports 2 and READNEXT will only extract 2 from the
list. The work around is to use Unibasic CLEARSELECT which functions
correctly as demonstrated above. When testing this using BASICTYPE "u"
and "WHEN @ID LIKE" the issue did not present itself. I have tested both
UNIX and Windows.

 

Does this happen in 7.2?

 

Regards,

Dan


###########################################################################################
The information transmitted in this message and attachments (if any) is 
intended only
for the person or entity to which it is addressed. The message may contain 
confidential
and/or privileged material.  Any review, retransmission, dissemination or other 
use of
or taking of any action in reliance upon this information by persons or 
entities other
than the intended recipient is prohibited.  If you received this in error, 
please
contact the sender and delete the material from any computer.

The intended recipient of this e-mail may only use, reproduce, disclose or 
distribute
the information contained in this e-mail and any attached files with the 
permission of IMB.
###########################################################################################
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to