Thanks for the information.  It is unusual that the subroutine works fine
without a list but it consumes the active select list if there is one when
the subroutine EXECUTES the select command.

On Mon, Sep 24, 2012 at 2:11 PM, Colin Alfke <alfke...@hotmail.com> wrote:

> Kevin;
>
> The "problem" is that the initial list is list 0 so that your execute
> select
> uses it - regardless of pass/rtnlist. Like David said you will have to save
> the list items before your select and then restore it to list 0 when done.
> Another alternative is to use the unibasic select - which loses any index
> gains and you have to process the file yourself.
>
> I don't use rtn/passlist so I'm not sure why they aren't compiling - but if
> you're using the "TO 2" syntax you shouldn't need them and I don't think
> they'll help you anyway, but I would be surprised that the compiler would
> catch the double usage.
>
> I've used the initial techniques with existing select lists. How list 0
> behaves while it's still building is an interesting test. I would like it
> to
> work - but am not really surprised that it doesn't.
>
> hth
> Colin
> -----Original Message-----
> From: Kevin King
> Sent: September 24, 2012 12:20 PM
> To: U2 Users List
> Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists
>
> What I don't understand is why I can't seem to get PASSLIST and RTNLIST to
> work in BASIC.  Seems that's exactly what these are intended to do but they
> give me nothing but compilation failures.
>
>  [snip]
> >>> On Behalf Of Kevin King
> >>> Sent: Monday, September 24, 2012 10:43 AM
> >>> To: U2 Users List
> >>> Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists
> >>>
> >>> Well, that success was short lived.  While the READLIST and FORMLIST
> >>> allow my SUBR(..) field to not consume the active select list zero,
> >>> these two commands produce different results:
> >>>
> >>> LIST ORDER.LINE WITH fieldName fieldName
> >>>
> >>> ...this will show the lines that have this field set, and will show
> >>> the field properly.  However, this command returns no items:
> >>>
> >>> SELECT ORDER.LINE WITH fieldName
> >>>
> >>> Basically my program is doing this:
> >>>
> >>> READLIST ACTIVE.LIST FROM 0 ELSE NULL
> >>> *
> >>> CMD = "select ... TO 2"
> >>> EXECUTE CMD CAPTURING OUTPUT
> >>> *
> >>> EOF = @FALSE
> >>> LOOP
> >>>   READNEXT ID FROM 2 ELSE EOF = @TRUE UNTIL EOF DO
> >>>   ..
> >>> REPEAT
> >>> *
> >>> CLEARSELECT 2
> >>> *
> >>> FORMLIST ACTIVE.LIST TO 0
> >>>
> >>> All other input/ideas appreciated.
> >>>
>
>
> _______________________________________________
> 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