Colin:
REQUIRE.SELECT only works with the UniData parser, which is okay. For
example:
7 Dev (0)-> BPTEST CMD = \SELECT APOPEN WITH INVNO = "1234567"\ ;
CMD<-1> = \SELECT APOPEN "3
71*1" REQUIRE.SELECT\ ; EXECUTE CMD ; END
Compiling Unibasic: SAVEDLISTS\BpTest_424967581 in mode 'p'.
compilation finished
No data retrieved from current (S)SELECT statement.
Illegal attribute name: REQUIRE.SELECT
7 Dev (0)-> BPTEST CMD = \SELECT APOPEN WITH INVNO = "1234567"\ ;
CMD<-1> = \select APOPEN "3
71*1" REQUIRE.SELECT\ ; EXECUTE CMD ; END
Compiling Unibasic: SAVEDLISTS\BpTest_429101431 in mode 'p'.
compilation finished
No data retrieved from current (S)SELECT statement.
No active select list. Processing terminated.
We run in Pick mode so this is just one of the many "dances" required
from UniData. Sometimes I forget these so thanks for the reminder
(although this didn't help at all during a D3 to UD conversion - didn't
want to change code when SYSTEM(11) works just fine).
Thanks again,
Bill
------------------------------------------------------------------------
----- Original Message -----
*From:* [email protected]
*To:* 'U2 Users List' <[email protected]>
*Date:* 7/7/2011 9:57 AM
*Subject:* Re: [U2] Found something interesting.....Bug or No
Bug....that is my question?
George - it's not so much the with - I think it's more the "=". It's a case
of it doing precisely what you ask as opposed to what you are thinking you
are doing. The "=" is creates "selection criteria" otherwise it considers
whatever follows as a record ID and ignores the outstanding select list.
Bill - don't forget the REQUIRE.SELECT keyword in UniData. It tests the
select list for you.
You can even combine them and get consistent (albeit even more confusing)
results.
Eg:
SELECT FILENAME # "EXISTING_ID"
54 records selected to list 0.
SELECT FILENAME "EXISTING_ID"
1 records selected to list 0.
CLEARSELECT
SELECT FILENAME # "EXISTING_ID"
54 records selected to list 0.
SELECT FILENAME = "EXISTING_ID"
No data retrieved from current (S)SELECT statement.
SELECT FILENAME # "EXISTING_ID"
54 records selected to list 0.
select FILENAME "EXISTING_ID" REQUIRE.SELECT
1 records selected to list 0.
CLEARSELECT
select FILENAME "EXISTING_ID" REQUIRE.SELECT
No active select list. Processing terminated.
Hth
Colin Alfke
Calgary, Canada
-----Original Message-----
From: Bill Haskett
I'm not sure about that. This, I believe, has always been the case.
I've always had problems worrying about whether the 1st select returned
anything; that's why I always do a SYSTEM(11) test after the initial
select, and rarely use the trick of loading TCL commands into an array
to execute all at once (unless I know for sure this condition won't occur).
UD v7.2.7 responds as I've always expected:
5 Dev (0)-> BPTEST CMD = \SELECT SOMEFILE WITH INVNO = "1234567"\ ;
CMD<-1> = \SELECT SOMEFILE "3
71*1"\ ; EXECUTE CMD ; END
Compiling Unibasic: SAVEDLISTS\BpTest_334914081 in mode 'p'.
compilation finished
No data retrieved from current (S)SELECT statement.
1 records selected to list 0.
...which treats the 2nd execute as its own if the 1st execute returns no
data from its select.
HTH,
Bill
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users