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

Reply via email to