Already mentioned, changing a UniBasic SELECT to an EXECUTE "SELECT..." is
changing the very fundamental definition of what you're doing.  The UniBasic
SELECT is, for lack of a better way to define it, a "delayed" select that
does not actually go through the file right then and actually select the
keys.  It pretty much just creates a pointer to the file that is moved with
each READNEXT, or whatever command.  The EXECUTE "SELECT..." is a fully
finished command that creates the select list in whatever select queue it
has been directed "to".  By default, without a "TO" clause, it's select list
0.  Personally, I like the equate option suggested but myself, I'd just use
the actual constant numbers since equates and variables are a lot more
typing and don't REALLY add anything to readability or documentation of the


-----Original Message-----
[] On Behalf Of Bill Brutzman
Sent: Friday, July 29, 2011 3:53 PM
To: U2 Users List
Subject: Re: [U2] UniBasic SELECT

Thanks to Larry and Wol for writing.

Both ways work to get rid of the red warnings but both ways I still get the
pesky SQL+ prompt at the end.

I only want to change the Basic SELECT to execute "SELECT..." because this
technique makes the Rocket BDT IDE red warning flag go away.  When I started
migrating programs to BDT, I found that changing CLEARSELECT ALL to execute
"CLEARSELECT ALL" was an easy clean fix to the IDE warnings.


-----Original Message-----
[] On Behalf Of Wols Lists
Sent: Friday, July 29, 2011 6:37 PM
Subject: Re: [U2] UniBasic SELECT

On 29/07/11 23:14, Bill Brutzman wrote:
> In an inherited  legacy app, I have a few commands like
>       LIST.1 = 1 
>       LIST.2 = 2 
>       LIST.3 = 3 
>       LIST.4 = 4
>       SELECT  F.ICC  to  LIST.2
>       SELECT  F.ICC  to  LIST.3
>       SELECT  F.ICC  to  LIST.4
> And then LIST.2   LIST.3   and  LIST.4  show up in loops such as ...
>       loop
>          readnext CLASS.KEY from LIST.2 else EOP = 1 until EOP = 1 DO
>        read R.ICC from F.ICC, CLASS.KEY else go Get.Next.Class.Key
>               .
>       .
>         Repeat
> The red warning marks on the right of the Rocket BDT IDE indicate...
"expecting INTEGER, found LIST.2"
> Notwithstanding the red warnings, the program compiles and runs ok.
> When I try to encapsulate these commands with
>       Execute " SELECT  F.ICC  to  LIST.2"
> The red warnings go away... the program runs ok but, I get a SQL+ prompt
after the report prints which can be resolved by just hitting <Enter>.
> I do not want my end users to have to deal with (for them) an unusual SQL+
> Suggested work-arounds to make the SQL+ prompt go away would be

Because SELECT F.ICC to LIST.2 in basic is COMPLETELY different to "SELECT

The original "expecting integer" warning is probably because the compiler is
expecting a literal, not a variable. But by enclosing it in quotes and
wrapping it in an EXECUTE, you've just converted LIST.2 from being an
integer variable to a string literal - a completely different beast.

Try instead changing "LIST.2 = 2" to "EQUATE LIST.2 TO 2" etc, and see if
that gets rid of all your warnings.
> --Bill

U2-Users mailing list
U2-Users mailing list
No virus found in this message.
Checked by AVG -
Version: 10.0.1390 / Virus Database: 1518/3796 - Release Date: 07/29/11

U2-Users mailing list

Reply via email to