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.

--Bill



-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wols Lists
Sent: Friday, July 29, 2011 6:37 PM
To: u2-users@listserver.u2ug.org
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+ 
> prompt.
> 
> Suggested work-arounds to make the SQL+ prompt go away would be appreciated.

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

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

Cheers,
Wol
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to