Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

2012-09-24 Thread Wjhonson





My documentation says PASSLIST and RTNLIST only work on select list 0 and ONLY 
work if the executed command is that which *creates* select list 0.  If the 
select list already exists *before* it reaches the execute, it will give you an 
error.
 
The execute with the passlist is the one which much create the list.


-Original Message-
From: Kevin King 
To: U2 Users List 
Sent: Mon, Sep 24, 2012 11:20 am
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.

On Mon, Sep 24, 2012 at 12:12 PM, George R Smith <
geo...@grsmith.arcoxmail.com> wrote:

> Kevin,
>
> Got it, and you don't want to or can't READNEXT thru and create your own
> list and save it to file of our choice then
> read it back in and use.  I know it seems like you should not have to do
> that but I have used this in the past.
>
>
> George
>
> -Original Message- From: Kevin King
> Sent: Monday, September 24, 2012 1:08 PM
>
> To: U2 Users List
> Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists
>
> That's just it, George, there is no saved list.  It's just an active list
> 0.
>
> On Mon, Sep 24, 2012 at 12:05 PM, George R Smith <
> geo...@grsmith.arcoxmail.com> wrote:
>
>  Have you given any consideration on reading the list from the pointer file
>> ?
>> George
>>
>> -Original Message----- From: Kevin King Sent: Monday, September 24,
>> 2012 1:01 PM To: U2 Users List Subject: Re: [U2] Unidata 7.1.16 Multiple
>> Active Select Lists
>> Bob, this is exactly what I'm attempting, to save the current 0 list and
>> restore it.  David, checking the list before the FORM.LIST appears to have
>> solved the problem.  Thank you.
>>
>> Has this kind of thing always been this onerous?  I recall doing it much
>> more easily - on Unidata - but it's been years.
>>
>> On Mon, Sep 24, 2012 at 11:57 AM, Woodward, Bob
>> wrote:
>>
>>
>>  Seems like the simple solution would be in your subroutine, before you
>>
>>> need to generate your select, test the SYSTEM variable to see if an
>>> active select is already in use.  If it is, do a READLIST into a
>>> variable.  Then at the end of your subroutine, if anything is in your
>>> variable, do a UNIBASIC SELECT to reestablish the active select list.
>>> You might just always check for an active list at the beginning of your
>>> subroutine as a normal setup function then as a exit routine, restore
>>> the active list.
>>>
>>> Just a thought.
>>>
>>> -Original Message-
\
 
 
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

2012-09-24 Thread Wols Lists
On 24/09/12 18:54, Kevin King wrote:
> Good thought on the index, but alas, no index on the file.  We could
> probably add one, but then how do we control the order of the records being
> retrieved from the list?  (The order is important to our process.)

You'll have to check, but IME with UV the index is actually stored in
sorted order. I think you can force numerics to sort correctly.

As for your original problem, the select list consuming list 0, what
happens (assuming you want to do it to list 8) if you do

SELECT FROM 8 TO 8

Does it blow up complaining there's nothing in 8 to start with, or does
it work the way you want?

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


Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

2012-09-24 Thread Colin Alfke
I think you would be more surprised that an executed select wasn't picking
up an active select list :). 

I do recall getting burned by UniData's select handling while we were
transitioning from D3. I had a Y2K program that would go though files and
change a 2 digit year that was part of the key. D3 would drop the select
where UniData wouldn't and it totally hammered a major file. eg in UniData
you can go SELECT CUSTOMERS WITH...; DATE; LIST CUSTOMERS and only see the
select list; however, D3 would drop the select list with the date command
and the list would list all.

In this case, you just don't "want" it to use the select list as you're
trying to do something different. Usually, we have a little more control
over where things start out - but it looks like you're trying to create a
dictionary item that you intend to use all over the place. UniData has the
REQUIRE.SELECT option for lists to make sure it only runs when there is an
active select, but I can't think of anything that would ignore an active
list.

Compounding the question is how does the active select list work while in
the middle of the actual select. Like I said, it would be nice that list 0
would contain everything up to that point, so you could save it, process
something else, "re-activate" it and continue selecting. However, it's not
hard to imagine someone optimizing the select process might not including
this permutation in testing scenarios.

The unibasic select works well for ignoring the active list, but
necessitates processing the entire file. I think in most cases, we've
already had a "dense index" in place that we can read instead of doing the
"nested" select.

hth
Colin

-Original Message-----
From: Kevin King
Sent: September 24, 2012 3:03 PM
To: U2 Users List
Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

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  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

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

2012-09-24 Thread Kevin King
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  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


Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

2012-09-24 Thread Colin Alfke
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


Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

2012-09-24 Thread Dave Davis
Well aware of all that, especially the negative numbers issue.

I restrict use of AR, DR locates to non-negative integers.

Otherwise I use comparisons inside of a loop.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Charles Stevenson
Sent: Monday, September 24, 2012 3:44 PM
To: U2 Users List
Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

Dave,

Be careful with that because LOCATE's sort BY "AR" or "DR" may be different 
from LIST's sort BY an "R"-justified field.  Leading zeros, negative numbers, 
decimals with trailing zeros all come to mind.
If I recall that inconsistency is consistent across several MV platforms.

However,  it might be more consistent of UD to be inconsistent with the 
MV-world (the MV-universe) on this point.

cds

On 9/24/2012 1:04 PM, Dave Davis wrote:
> What we do in situations like this is set up a subroutine that retrieves the 
> list of record keys in "B", given the value of the index I want to retrieve.  
> This can then be called from an I-type in "A", or from another subroutine.
>
> I do the sort the hard way (in basic) so that the keys are in the
> correct order, usually using LOCATE with "AL" or "AR" and INSERT

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users



Dave Davis
Team Lead, R&D

P: 614-875-4910 x108
F: 614-875-4088
E: dda...@harriscomputer.com
[http://www.harriscomputer.com/images/signatures/HarrisSchools.gif]

[http://www.harriscomputer.com/images/signatures/DivisionofHarris.gif]<http://www.harriscomputer.com/>
6110 Enterprise Parkway
Grove City, OH
43123
www.harris-schoolsolutions.com<http://www.harris-schoolsolutions.com>

This message is intended exclusively for the individual or entity to which it 
is addressed. This communication may contain information that is proprietary, 
privileged or confidential or otherwise legally exempt from disclosure. If you 
are not the named addressee, you are not authorized to read, print, retain, 
copy or disseminate this message or any part of it. If you have received this 
message in error, please notify the sender immediately by e-mail and delete all 
copies of the message.

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

2012-09-24 Thread Charles Stevenson

Kevin,

This is a long shot,  an Is-it-plugged-In-Category question, but you 
might as well check:


On UV I got bit recently using numbered select lists because "1", "2", 
... were custom items in the VOC.
Some commands recognized the numbered select lists on the command line; 
but  some read the VOC and got confused.


cds

On 9/24/2012 11:43 AM, Kevin King wrote:

How does one manage multiple active select lists in Unidata?  I could have
sworn I've done this before, but for some reason it's not working at all as
I recall.

I have this SUBR(..) type field in file A that selects records from file B
to calculate an aggregate.  This works fine when listing file A and showing
the field.  However, if there's an active select list when file A is listed
with this field, the select statement in my SUBR(..) is consuming the
active select list 0 and returning incorrect results.

My subroutine is $BASICTYPE "U" and is selecting records using the lower
case select and selecting to active list #3.  It then processes from list
#3 and returns its result.  I've tried using the RTNLIST and PASSLIST
options on the EXECUTE statements and I get a "Misuse of Reserved Word
'PASSLIST'" or "Misuse of Reserved Word 'RTNLIST'".  I've tried UDTEXECUTE
with no compilation errors but also no improvement on the problem.  I've
even tried MDPERFORM but I get the misuse errors with the RTNLIST and
PASSLIST options.  Oddly enough, removing $BASICTYPE "U" I don't get an
error on MDPERFORM but I can't READNEXT from a numbered select without the
$BASICTYPE "U".

How should I structure this SUBR(..) so that it does not consume list 0
when selecting to list 3?



___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

2012-09-24 Thread Charles Stevenson

Dave,

Be careful with that because LOCATE's sort BY "AR" or "DR" may be 
different from LIST's sort BY an "R"-justified field.  Leading zeros, 
negative numbers, decimals with trailing zeros all come to mind.

If I recall that inconsistency is consistent across several MV platforms.

However,  it might be more consistent of UD to be inconsistent with the 
MV-world (the MV-universe) on this point.


cds

On 9/24/2012 1:04 PM, Dave Davis wrote:

What we do in situations like this is set up a subroutine that retrieves the list of record keys in 
"B", given the value of the index I want to retrieve.  This can then be called from an 
I-type in "A", or from another subroutine.

I do the sort the hard way (in basic) so that the keys are in the correct order, usually using 
LOCATE with "AL" or "AR" and INSERT


___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

2012-09-24 Thread David Wolverton
AH!  Probably explains why we would have to set WIP.LIST in your example --
we use BASICTYPE P everywhere.  Never thought about it being
BASICTYPE-based, but makes perfect sense.

Thanks Trevor!

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Trevor Fulton
Sent: Monday, September 24, 2012 12:44 PM
To: U2 Users List
Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

BASICTYPE M and P allows for named Select Lists, so you can

EXECUTE SENTENCE RTNLIST WIP.LIST CAPTURING JUNK

LOOP 
READNEXT WIP.ID FROM WIP.LIST ELSE EXIT 
CALL SUB1
REPEAT

So in SUB1 you can do another EXECUTE to another Named list.

Trevor.


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
Sent: 24 September 2012 17:43
To: U2 Users List
Subject: [U2] Unidata 7.1.16 Multiple Active Select Lists

How does one manage multiple active select lists in Unidata?  I could have
sworn I've done this before, but for some reason it's not working at all as
I recall.

I have this SUBR(..) type field in file A that selects records from file B
to calculate an aggregate.  This works fine when listing file A and showing
the field.  However, if there's an active select list when file A is listed
with this field, the select statement in my SUBR(..) is consuming the active
select list 0 and returning incorrect results.

My subroutine is $BASICTYPE "U" and is selecting records using the lower
case select and selecting to active list #3.  It then processes from list
#3 and returns its result.  I've tried using the RTNLIST and PASSLIST
options on the EXECUTE statements and I get a "Misuse of Reserved Word
'PASSLIST'" or "Misuse of Reserved Word 'RTNLIST'".  I've tried UDTEXECUTE
with no compilation errors but also no improvement on the problem.  I've
even tried MDPERFORM but I get the misuse errors with the RTNLIST and
PASSLIST options.  Oddly enough, removing $BASICTYPE "U" I don't get an
error on MDPERFORM but I can't READNEXT from a numbered select without the
$BASICTYPE "U".

How should I structure this SUBR(..) so that it does not consume list 0 when
selecting to list 3?
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Click
https://www.mailcontrol.com/sr/wQw0zmjPoHdJTZGyOCrrhg==
mzYSmfEz!grmb2Vr9yuNyLUcPPmbfFPdrr1lqOECv!Swg==  to report this email as
spam.


Epicor Software (UK) is a limited company registered in England & Wales.  
Registration Number: 2338274.   Registered Office:  6th Floor, One London
Wall, London EC2Y 5EB 
This e-mail is for the use of the intended recipient(s) only. If you have
received this e-mail in error, please notify the sender immediately and then
delete it. If you are not the intended recipient, you must not use, disclose
or distribute this e-mail without the author's prior permission. We have
taken precautions to minimize the risk of transmitting software viruses, but
we advise you to carry out your own virus checks on any attachment to this
message. We cannot accept liability for any loss or damage caused by
software viruses. Any views and/or opinions expressed in this e-mail are of
the author only and do not represent the views of Epicor Software (UK)
Limited or any other company within its group.


This message has been scanned for malware by Websense. www.websense.com
___
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


Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

2012-09-24 Thread Woodward, Bob
Guess I should have waited to decide I had the answer until I paid
attention to ALL of the message you typed.I wonder if there is
a difference between FORMLIST and just plain SELECT.  As long as your
variable exists, even if it's empty, you should get the same contents in
cursor 0 as when processing entered your subroutine.  Unless maybe it
was using "0" as a variable NAME instead of cursor 0.  Maybe?

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
Sent: Monday, September 24, 2012 11:02 AM
To: U2 Users List
Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

Bob, this is exactly what I'm attempting, to save the current 0 list and
restore it.  David, checking the list before the FORM.LIST appears to
have solved the problem.  Thank you.

Has this kind of thing always been this onerous?  I recall doing it much
more easily - on Unidata - but it's been years.

On Mon, Sep 24, 2012 at 11:57 AM, Woodward, Bob
wrote:

> Seems like the simple solution would be in your subroutine, before you

> need to generate your select, test the SYSTEM variable to see if an 
> active select is already in use.  If it is, do a READLIST into a 
> variable.  Then at the end of your subroutine, if anything is in your 
> variable, do a UNIBASIC SELECT to reestablish the active select list.
> You might just always check for an active list at the beginning of 
> your subroutine as a normal setup function then as a exit routine, 
> restore the active list.
>
> Just a thought.
>
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org
> [mailto:u2-users-boun...@listserver.u2ug.org] 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.
>
> On Mon, Sep 24, 2012 at 11:26 AM, Kevin King 
> wrote:
>
> > And we have a winner!  Thank you everyone!  The READLIST and 
> > FORMLIST will work; seems kinda kludgy, but hey, it's working.
> >
> >
> > On Mon, Sep 24, 2012 at 11:21 AM, David A. Green 
> >  > > wrote:
> >
> >> If you already have an active list then you'll have to save it, 
> >> then restore it.  See READLIST and FORMLIST.
> >>
> >> David A. Green
> >> (480) 813-1725
> >> DAG Consulting
> >>
> >> -Original Message-
> >> From: u2-users-boun...@listserver.u2ug.org
> >> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin 
> >> King
> >> Sent: Monday, September 24, 2012 10:11 AM
> >> To: U2 Users List
> >> Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists
> >>
> >> It's all fine if the program controls both lists, but in this case 
> >> the
> >> SUBR(..) type field could be accessed in just about any context, 
> >> from
>
> >> TCL, from a download, from MITS, from another BASIC routine, with 
> >> or without a select list...
> >>
> >> The RTNLIST doesn't solve the problem of my "select" command 
> >> consuming the active list 0.  It seems that the PASSLIST extension 
> >> to
>
> >> EXECUTE is designed specifically for this purpose, but it produces 
> >> nothing but compilation
> >> errors:
> >>
> >> CMD = "select ..."
> >> EXECUTE CMD CAPTURING OUTPUT RTNLIST 2 PASSLIST 2
> >>
> >> ...produces a compilation error about the "misuse" of RTNLIST, 
> >> despite the documentation saying this should be possible.
> >>
> >> The point is that I want to leave select list 0 entirely alone, 
> >> which
>
> >> is why I'm using $BASICTYPE "U".  BASICTYPE "P" - standard on these
> >> SB+ systems 

Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

2012-09-24 Thread Kevin King
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.

On Mon, Sep 24, 2012 at 12:12 PM, George R Smith <
geo...@grsmith.arcoxmail.com> wrote:

> Kevin,
>
> Got it, and you don't want to or can't READNEXT thru and create your own
> list and save it to file of our choice then
> read it back in and use.  I know it seems like you should not have to do
> that but I have used this in the past.
>
>
> George
>
> -Original Message- From: Kevin King
> Sent: Monday, September 24, 2012 1:08 PM
>
> To: U2 Users List
> Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists
>
> That's just it, George, there is no saved list.  It's just an active list
> 0.
>
> On Mon, Sep 24, 2012 at 12:05 PM, George R Smith <
> geo...@grsmith.arcoxmail.com> wrote:
>
>  Have you given any consideration on reading the list from the pointer file
>> ?
>> George
>>
>> -Original Message----- From: Kevin King Sent: Monday, September 24,
>> 2012 1:01 PM To: U2 Users List Subject: Re: [U2] Unidata 7.1.16 Multiple
>> Active Select Lists
>> Bob, this is exactly what I'm attempting, to save the current 0 list and
>> restore it.  David, checking the list before the FORM.LIST appears to have
>> solved the problem.  Thank you.
>>
>> Has this kind of thing always been this onerous?  I recall doing it much
>> more easily - on Unidata - but it's been years.
>>
>> On Mon, Sep 24, 2012 at 11:57 AM, Woodward, Bob
>> wrote:
>>
>>
>>  Seems like the simple solution would be in your subroutine, before you
>>
>>> need to generate your select, test the SYSTEM variable to see if an
>>> active select is already in use.  If it is, do a READLIST into a
>>> variable.  Then at the end of your subroutine, if anything is in your
>>> variable, do a UNIBASIC SELECT to reestablish the active select list.
>>> You might just always check for an active list at the beginning of your
>>> subroutine as a normal setup function then as a exit routine, restore
>>> the active list.
>>>
>>> Just a thought.
>>>
>>> -Original Message-
>>> From: u2-users-bounces@listserver.u2ug.org <http://u2ug.org><
>>> u2-users-bounces@**listserver.u2ug.org
>>> >
>>> [mailto:u2-users-bounces@**lis**tserver.u2ug.org<http://listserver.u2ug.org>
>>> 
>>> >]
>>> 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.
>>>
>>> On Mon, Sep 24, 2012 at 11:26 AM, Kevin King 
>>> wrote:
>>>
>>> > And we have a winner!  Thank you everyone!  The READLIST and FORMLIST
>>> > will work; seems kinda kludgy, but hey, it's working.
>>> >
>>> >
>>> > On Mon, Sep 24, 2012 at 11:21 AM, David A. Green
>>> > >> > > wrote:
>>> >
>>> >> If you already have an active list then you'll have to save it, then
>>> >> restore it.  See READLIST and FORMLIST.
>>> >>
>>> >> David A. Green
>>> >> (480) 813-1725
>>> >> DAG Consulting
>>> >>
>>> >> -Original Message-
>>> >> From: >> u2-users-bounces@listserver.u2ug.org <http://u2ug.org><
>>

Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

2012-09-24 Thread George R Smith

Kevin,

Got it, and you don't want to or can't READNEXT thru and create your own 
list and save it to file of our choice then
read it back in and use.  I know it seems like you should not have to do 
that but I have used this in the past.


George

-Original Message- 
From: Kevin King

Sent: Monday, September 24, 2012 1:08 PM
To: U2 Users List
Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

That's just it, George, there is no saved list.  It's just an active list 0.

On Mon, Sep 24, 2012 at 12:05 PM, George R Smith <
geo...@grsmith.arcoxmail.com> wrote:


Have you given any consideration on reading the list from the pointer file
?
George

-Original Message- From: Kevin King Sent: Monday, September 24,
2012 1:01 PM To: U2 Users List Subject: Re: [U2] Unidata 7.1.16 Multiple
Active Select Lists
Bob, this is exactly what I'm attempting, to save the current 0 list and
restore it.  David, checking the list before the FORM.LIST appears to have
solved the problem.  Thank you.

Has this kind of thing always been this onerous?  I recall doing it much
more easily - on Unidata - but it's been years.

On Mon, Sep 24, 2012 at 11:57 AM, Woodward, Bob
**wrote:

 Seems like the simple solution would be in your subroutine, before you

need to generate your select, test the SYSTEM variable to see if an
active select is already in use.  If it is, do a READLIST into a
variable.  Then at the end of your subroutine, if anything is in your
variable, do a UNIBASIC SELECT to reestablish the active select list.
You might just always check for an active list at the beginning of your
subroutine as a normal setup function then as a exit routine, restore
the active list.

Just a thought.

-Original Message-
From: 
u2-users-bounces@listserver.**u2ug.org

[mailto:u2-users-bounces@**listserver.u2ug.org]
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.

On Mon, Sep 24, 2012 at 11:26 AM, Kevin King 
wrote:

> And we have a winner!  Thank you everyone!  The READLIST and FORMLIST
> will work; seems kinda kludgy, but hey, it's working.
>
>
> On Mon, Sep 24, 2012 at 11:21 AM, David A. Green
>  > wrote:
>
>> If you already have an active list then you'll have to save it, then
>> restore it.  See READLIST and FORMLIST.
>>
>> David A. Green
>> (480) 813-1725
>> DAG Consulting
>>
>> -Original Message-
>> From: 
>> u2-users-bounces@listserver.**u2ug.org

>> 
[mailto:u2-users-bounces@**listserver.u2ug.org]
On Behalf Of Kevin King
>> Sent: Monday, September 24, 2012 10:11 AM
>> To: U2 Users List
>> Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists
>>
>> It's all fine if the program controls both lists, but in this case
>> the
>> SUBR(..) type field could be accessed in just about any context, from

>> TCL, from a download, from MITS, from another BASIC routine, with or
>> without a select list...
>>
>> The RTNLIST doesn't solve the problem of my "select" command
>> consuming the active list 0.  It seems that the PASSLIST extension to

>> EXECUTE is designed specifically for this purpose, but it produces
>> nothing but compilation
>> errors:
>>
>> CMD = "select ..."
>> EXECUTE CMD CAPTURING OUTPUT RTNLIST 2 PASSLIST 2
>>
>> ...produces a compilation error about the "misuse" of RTNLIST,
>> despite the documentation saying this should be possible.
>>
>> The point is that I want to leave select list 0 entirely alone, which

>> is why I'm using $BASICTYPE "U".  BASICTYPE "P" - standard on these
>> SB+ systems - does not allow one to READNEXT from anything but list
>> 0, and I want to leave list zero untouched.
>>
>> Gotta be a way, right?
>>
>> -K
>>
>> On Mon, Sep 24, 2012 at 10:56 AM, Martin Braid 
wrote:
>>
>> > Hi Kevin, Any reason why you are using type "U" ? This
certainly
>> > work

Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

2012-09-24 Thread Kevin King
That's just it, George, there is no saved list.  It's just an active list 0.

On Mon, Sep 24, 2012 at 12:05 PM, George R Smith <
geo...@grsmith.arcoxmail.com> wrote:

> Have you given any consideration on reading the list from the pointer file
> ?
> George
>
> -Original Message- From: Kevin King Sent: Monday, September 24,
> 2012 1:01 PM To: U2 Users List Subject: Re: [U2] Unidata 7.1.16 Multiple
> Active Select Lists
> Bob, this is exactly what I'm attempting, to save the current 0 list and
> restore it.  David, checking the list before the FORM.LIST appears to have
> solved the problem.  Thank you.
>
> Has this kind of thing always been this onerous?  I recall doing it much
> more easily - on Unidata - but it's been years.
>
> On Mon, Sep 24, 2012 at 11:57 AM, Woodward, Bob
> **wrote:
>
>  Seems like the simple solution would be in your subroutine, before you
>> need to generate your select, test the SYSTEM variable to see if an
>> active select is already in use.  If it is, do a READLIST into a
>> variable.  Then at the end of your subroutine, if anything is in your
>> variable, do a UNIBASIC SELECT to reestablish the active select list.
>> You might just always check for an active list at the beginning of your
>> subroutine as a normal setup function then as a exit routine, restore
>> the active list.
>>
>> Just a thought.
>>
>> -Original Message-
>> From: 
>> u2-users-bounces@listserver.**u2ug.org
>> [mailto:u2-users-bounces@**listserver.u2ug.org]
>> 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.
>>
>> On Mon, Sep 24, 2012 at 11:26 AM, Kevin King 
>> wrote:
>>
>> > And we have a winner!  Thank you everyone!  The READLIST and FORMLIST
>> > will work; seems kinda kludgy, but hey, it's working.
>> >
>> >
>> > On Mon, Sep 24, 2012 at 11:21 AM, David A. Green
>> > > > > wrote:
>> >
>> >> If you already have an active list then you'll have to save it, then
>> >> restore it.  See READLIST and FORMLIST.
>> >>
>> >> David A. Green
>> >> (480) 813-1725
>> >> DAG Consulting
>> >>
>> >> -Original Message-
>> >> From: 
>> >> u2-users-bounces@listserver.**u2ug.org
>> >> [mailto:u2-users-bounces@**listserver.u2ug.org]
>> On Behalf Of Kevin King
>> >> Sent: Monday, September 24, 2012 10:11 AM
>> >> To: U2 Users List
>> >> Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists
>> >>
>> >> It's all fine if the program controls both lists, but in this case
>> >> the
>> >> SUBR(..) type field could be accessed in just about any context, from
>>
>> >> TCL, from a download, from MITS, from another BASIC routine, with or
>> >> without a select list...
>> >>
>> >> The RTNLIST doesn't solve the problem of my "select" command
>> >> consuming the active list 0.  It seems that the PASSLIST extension to
>>
>> >> EXECUTE is designed specifically for this purpose, but it produces
>> >> nothing but compilation
>> >> errors:
>> >>
>> >> CMD = "select ..."
>> >> EXECUTE CMD CAPTURING OUTPUT RTNLIST 2 PASSLIST 2
>> >>
>> >> ...produces a compilation error about the "misuse" of RTNLIST,
>> >> despite the documentation saying this should be possible.
>> >>
>> >> The point is that I want to leave sel

Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

2012-09-24 Thread George R Smith

Have you given any consideration on reading the list from the pointer file ?
George

-Original Message- 
From: Kevin King 
Sent: Monday, September 24, 2012 1:01 PM 
To: U2 Users List 
Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists 


Bob, this is exactly what I'm attempting, to save the current 0 list and
restore it.  David, checking the list before the FORM.LIST appears to have
solved the problem.  Thank you.

Has this kind of thing always been this onerous?  I recall doing it much
more easily - on Unidata - but it's been years.

On Mon, Sep 24, 2012 at 11:57 AM, Woodward, Bob
wrote:


Seems like the simple solution would be in your subroutine, before you
need to generate your select, test the SYSTEM variable to see if an
active select is already in use.  If it is, do a READLIST into a
variable.  Then at the end of your subroutine, if anything is in your
variable, do a UNIBASIC SELECT to reestablish the active select list.
You might just always check for an active list at the beginning of your
subroutine as a normal setup function then as a exit routine, restore
the active list.

Just a thought.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] 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.

On Mon, Sep 24, 2012 at 11:26 AM, Kevin King 
wrote:

> And we have a winner!  Thank you everyone!  The READLIST and FORMLIST
> will work; seems kinda kludgy, but hey, it's working.
>
>
> On Mon, Sep 24, 2012 at 11:21 AM, David A. Green
>  > wrote:
>
>> If you already have an active list then you'll have to save it, then
>> restore it.  See READLIST and FORMLIST.
>>
>> David A. Green
>> (480) 813-1725
>> DAG Consulting
>>
>> -Original Message-
>> From: u2-users-boun...@listserver.u2ug.org
>> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
>> Sent: Monday, September 24, 2012 10:11 AM
>> To: U2 Users List
>> Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists
>>
>> It's all fine if the program controls both lists, but in this case
>> the
>> SUBR(..) type field could be accessed in just about any context, from

>> TCL, from a download, from MITS, from another BASIC routine, with or
>> without a select list...
>>
>> The RTNLIST doesn't solve the problem of my "select" command
>> consuming the active list 0.  It seems that the PASSLIST extension to

>> EXECUTE is designed specifically for this purpose, but it produces
>> nothing but compilation
>> errors:
>>
>> CMD = "select ..."
>> EXECUTE CMD CAPTURING OUTPUT RTNLIST 2 PASSLIST 2
>>
>> ...produces a compilation error about the "misuse" of RTNLIST,
>> despite the documentation saying this should be possible.
>>
>> The point is that I want to leave select list 0 entirely alone, which

>> is why I'm using $BASICTYPE "U".  BASICTYPE "P" - standard on these
>> SB+ systems - does not allow one to READNEXT from anything but list
>> 0, and I want to leave list zero untouched.
>>
>> Gotta be a way, right?
>>
>> -K
>>
>> On Mon, Sep 24, 2012 at 10:56 AM, Martin Braid 
wrote:
>>
>> > Hi Kevin, Any reason why you are using type "U" ? This
certainly
>> > works using "P" ...
>> >
>> > S='SELECT SOMEFILE WITH SOMETHING = "OOJIT"'
>> > EXECUTE S RTNLIST MYLIST CAPTURING ANYOUTPUT
>> > EOF=0
>> > LOOP UNTIL EOF DO
>> >   READNEXT MYID FROM MYLIST THEN
>> > GSOUB MYMESS
>> >   END ELSE EOF=1
>> > REPEAT
>> >
>> > Martin
>> >
>> >
>> > -Original Message-
>> > From: u2-users-boun...@listserver.u2ug.org
>> > [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Baker
>> > Hughes
>> > S

Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

2012-09-24 Thread Dave Davis
What we do in situations like this is set up a subroutine that retrieves the 
list of record keys in "B", given the value of the index I want to retrieve.  
This can then be called from an I-type in "A", or from another subroutine.

I do the sort the hard way (in basic) so that the keys are in the correct 
order, usually using LOCATE with "AL" or "AR" and INSERT.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
Sent: Monday, September 24, 2012 1:55 PM
To: U2 Users List
Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

Good thought on the index, but alas, no index on the file.  We could probably 
add one, but then how do we control the order of the records being retrieved 
from the list?  (The order is important to our process.)

On Mon, Sep 24, 2012 at 11:49 AM, Dave Davis wrote:

> Aren't these nested selects kind of slow?
>
> If the field in file b is indexed, I would use the SETINDEX and
> READFWD statements in place of the SELECT statement.  You are using
> Unidata, so unless you need to make this work for Universe as well
> that's what I would do.
>
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org [mailto:
> u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
> Sent: Monday, September 24, 2012 1:43 PM
> 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.
>
> On Mon, Sep 24, 2012 at 11:26 AM, Kevin King 
> wrote:
>
> > And we have a winner!  Thank you everyone!  The READLIST and
> > FORMLIST will work; seems kinda kludgy, but hey, it's working.
> >
> >
> > On Mon, Sep 24, 2012 at 11:21 AM, David A. Green
> >  > > wrote:
> >
> >> If you already have an active list then you'll have to save it,
> >> then restore it.  See READLIST and FORMLIST.
> >>
> >> David A. Green
> >> (480) 813-1725
> >> DAG Consulting
> >>
> >> -Original Message-
> >> From: u2-users-boun...@listserver.u2ug.org
> >> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin
> >> King
> >> Sent: Monday, September 24, 2012 10:11 AM
> >> To: U2 Users List
> >> Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists
> >>
> >> It's all fine if the program controls both lists, but in this case
> >> the
> >> SUBR(..) type field could be accessed in just about any context,
> >> from TCL, from a download, from MITS, from another BASIC routine,
> >> with or without a select list...
> >>
> >> The RTNLIST doesn't solve the problem of my "select" command
> >> consuming the active list 0.  It seems that the PASSLIST extension
> >> to EXECUTE is designed specifically for this purpose, but it
> >> produces nothing but compilation
> >> errors:
> >>
> >> CMD = "select ..."
> >> EXECUTE CMD CAPTURING OUTPUT RTNLIST 2 PASSLIST 2
> >>
> >> ...produces a compilation error about the "misuse" of RTNLIST,
> >> despite the documentation saying this should be possible.
> >>
> >> The point is that I want to leave select list 0 entirely alone,
> >> which is why I'm using $BASICTYPE "U".  BASICTYPE "P" - standard on
> >> these
> >> SB+ systems - does not allow one to READNEXT from anything but list
> >> 0, and I want to leave list zero untouched.
> >>
> >> Gotta be a way, right?
> >>
> >> -K
> >>
> >> On Mon, Sep 24, 2012 at 10:56 AM, Martin Braid 
> wrote:
> >>
> >> > Hi Kevin, Any reason why you are using type "U" ? This certainly
> >> > works using "P" ...
> >> >

Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

2012-09-24 Thread Kevin King
Bob, this is exactly what I'm attempting, to save the current 0 list and
restore it.  David, checking the list before the FORM.LIST appears to have
solved the problem.  Thank you.

Has this kind of thing always been this onerous?  I recall doing it much
more easily - on Unidata - but it's been years.

On Mon, Sep 24, 2012 at 11:57 AM, Woodward, Bob
wrote:

> Seems like the simple solution would be in your subroutine, before you
> need to generate your select, test the SYSTEM variable to see if an
> active select is already in use.  If it is, do a READLIST into a
> variable.  Then at the end of your subroutine, if anything is in your
> variable, do a UNIBASIC SELECT to reestablish the active select list.
> You might just always check for an active list at the beginning of your
> subroutine as a normal setup function then as a exit routine, restore
> the active list.
>
> Just a thought.
>
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org
> [mailto:u2-users-boun...@listserver.u2ug.org] 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.
>
> On Mon, Sep 24, 2012 at 11:26 AM, Kevin King 
> wrote:
>
> > And we have a winner!  Thank you everyone!  The READLIST and FORMLIST
> > will work; seems kinda kludgy, but hey, it's working.
> >
> >
> > On Mon, Sep 24, 2012 at 11:21 AM, David A. Green
> >  > > wrote:
> >
> >> If you already have an active list then you'll have to save it, then
> >> restore it.  See READLIST and FORMLIST.
> >>
> >> David A. Green
> >> (480) 813-1725
> >> DAG Consulting
> >>
> >> -Original Message-
> >> From: u2-users-boun...@listserver.u2ug.org
> >> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
> >> Sent: Monday, September 24, 2012 10:11 AM
> >> To: U2 Users List
> >> Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists
> >>
> >> It's all fine if the program controls both lists, but in this case
> >> the
> >> SUBR(..) type field could be accessed in just about any context, from
>
> >> TCL, from a download, from MITS, from another BASIC routine, with or
> >> without a select list...
> >>
> >> The RTNLIST doesn't solve the problem of my "select" command
> >> consuming the active list 0.  It seems that the PASSLIST extension to
>
> >> EXECUTE is designed specifically for this purpose, but it produces
> >> nothing but compilation
> >> errors:
> >>
> >> CMD = "select ..."
> >> EXECUTE CMD CAPTURING OUTPUT RTNLIST 2 PASSLIST 2
> >>
> >> ...produces a compilation error about the "misuse" of RTNLIST,
> >> despite the documentation saying this should be possible.
> >>
> >> The point is that I want to leave select list 0 entirely alone, which
>
> >> is why I'm using $BASICTYPE "U".  BASICTYPE "P" - standard on these
> >> SB+ systems - does not allow one to READNEXT from anything but list
> >> 0, and I want to leave list zero untouched.
> >>
> >> Gotta be a way, right?
> >>
> >> -K
> >>
> >> On Mon, Sep 24, 2012 at 10:56 AM, Martin Braid 
> wrote:
> >>
> >> > Hi Kevin, Any reason why you are using type "U" ? This
> certainly
> >> > works using "P" ...
> >> >
> >> > S='SELECT SOMEFILE WITH SOMETHING = "OOJIT"'
> >> > EXECUTE S RTNLIST MYLIST CAPTURING ANYOUTPUT
> >> > EOF=0
> >> > LOOP UNTIL EOF DO
> >> >   READNEXT MYID FROM MYLIST THEN
> >> > GSOUB MYMESS
> >> &

Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

2012-09-24 Thread Woodward, Bob
Seems like the simple solution would be in your subroutine, before you
need to generate your select, test the SYSTEM variable to see if an
active select is already in use.  If it is, do a READLIST into a
variable.  Then at the end of your subroutine, if anything is in your
variable, do a UNIBASIC SELECT to reestablish the active select list.
You might just always check for an active list at the beginning of your
subroutine as a normal setup function then as a exit routine, restore
the active list.

Just a thought.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] 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.

On Mon, Sep 24, 2012 at 11:26 AM, Kevin King 
wrote:

> And we have a winner!  Thank you everyone!  The READLIST and FORMLIST 
> will work; seems kinda kludgy, but hey, it's working.
>
>
> On Mon, Sep 24, 2012 at 11:21 AM, David A. Green 
>  > wrote:
>
>> If you already have an active list then you'll have to save it, then 
>> restore it.  See READLIST and FORMLIST.
>>
>> David A. Green
>> (480) 813-1725
>> DAG Consulting
>>
>> -Original Message-
>> From: u2-users-boun...@listserver.u2ug.org
>> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
>> Sent: Monday, September 24, 2012 10:11 AM
>> To: U2 Users List
>> Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists
>>
>> It's all fine if the program controls both lists, but in this case 
>> the
>> SUBR(..) type field could be accessed in just about any context, from

>> TCL, from a download, from MITS, from another BASIC routine, with or 
>> without a select list...
>>
>> The RTNLIST doesn't solve the problem of my "select" command 
>> consuming the active list 0.  It seems that the PASSLIST extension to

>> EXECUTE is designed specifically for this purpose, but it produces 
>> nothing but compilation
>> errors:
>>
>> CMD = "select ..."
>> EXECUTE CMD CAPTURING OUTPUT RTNLIST 2 PASSLIST 2
>>
>> ...produces a compilation error about the "misuse" of RTNLIST, 
>> despite the documentation saying this should be possible.
>>
>> The point is that I want to leave select list 0 entirely alone, which

>> is why I'm using $BASICTYPE "U".  BASICTYPE "P" - standard on these 
>> SB+ systems - does not allow one to READNEXT from anything but list 
>> 0, and I want to leave list zero untouched.
>>
>> Gotta be a way, right?
>>
>> -K
>>
>> On Mon, Sep 24, 2012 at 10:56 AM, Martin Braid 
wrote:
>>
>> > Hi Kevin, Any reason why you are using type "U" ? This
certainly
>> > works using "P" ...
>> >
>> > S='SELECT SOMEFILE WITH SOMETHING = "OOJIT"'
>> > EXECUTE S RTNLIST MYLIST CAPTURING ANYOUTPUT
>> > EOF=0
>> > LOOP UNTIL EOF DO
>> >   READNEXT MYID FROM MYLIST THEN
>> > GSOUB MYMESS
>> >   END ELSE EOF=1
>> > REPEAT
>> >
>> > Martin
>> >
>> >
>> > -Original Message-
>> > From: u2-users-boun...@listserver.u2ug.org
>> > [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Baker 
>> > Hughes
>> > Sent: 24 September 2012 17:49
>> > To: 'U2 Users List'
>> > Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists
>> >
>> > Can you use SELECT yourfile WITH whatever TO 8 {specific list 
>> > number} in the master process, and let your SUBR virtual field 
>> > default to list
>> > 0 {zero}?
>> >
>> > The other option could be to do a READLIST within the SUBR function

>> > and reset the list when RETURNing, but this could be onerous in 
>> > terms of processing speed.
>> >
>> > H

Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

2012-09-24 Thread Kevin King
Good thought on the index, but alas, no index on the file.  We could
probably add one, but then how do we control the order of the records being
retrieved from the list?  (The order is important to our process.)

On Mon, Sep 24, 2012 at 11:49 AM, Dave Davis wrote:

> Aren't these nested selects kind of slow?
>
> If the field in file b is indexed, I would use the SETINDEX and READFWD
> statements in place of the SELECT statement.  You are using Unidata, so
> unless you need to make this work for Universe as well that's what I would
> do.
>
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org [mailto:
> u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
> Sent: Monday, September 24, 2012 1:43 PM
> 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.
>
> On Mon, Sep 24, 2012 at 11:26 AM, Kevin King 
> wrote:
>
> > And we have a winner!  Thank you everyone!  The READLIST and FORMLIST
> > will work; seems kinda kludgy, but hey, it's working.
> >
> >
> > On Mon, Sep 24, 2012 at 11:21 AM, David A. Green
> >  > > wrote:
> >
> >> If you already have an active list then you'll have to save it, then
> >> restore it.  See READLIST and FORMLIST.
> >>
> >> David A. Green
> >> (480) 813-1725
> >> DAG Consulting
> >>
> >> -Original Message-
> >> From: u2-users-boun...@listserver.u2ug.org
> >> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
> >> Sent: Monday, September 24, 2012 10:11 AM
> >> To: U2 Users List
> >> Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists
> >>
> >> It's all fine if the program controls both lists, but in this case
> >> the
> >> SUBR(..) type field could be accessed in just about any context, from
> >> TCL, from a download, from MITS, from another BASIC routine, with or
> >> without a select list...
> >>
> >> The RTNLIST doesn't solve the problem of my "select" command
> >> consuming the active list 0.  It seems that the PASSLIST extension to
> >> EXECUTE is designed specifically for this purpose, but it produces
> >> nothing but compilation
> >> errors:
> >>
> >> CMD = "select ..."
> >> EXECUTE CMD CAPTURING OUTPUT RTNLIST 2 PASSLIST 2
> >>
> >> ...produces a compilation error about the "misuse" of RTNLIST,
> >> despite the documentation saying this should be possible.
> >>
> >> The point is that I want to leave select list 0 entirely alone, which
> >> is why I'm using $BASICTYPE "U".  BASICTYPE "P" - standard on these
> >> SB+ systems - does not allow one to READNEXT from anything but list
> >> 0, and I want to leave list zero untouched.
> >>
> >> Gotta be a way, right?
> >>
> >> -K
> >>
> >> On Mon, Sep 24, 2012 at 10:56 AM, Martin Braid 
> wrote:
> >>
> >> > Hi Kevin, Any reason why you are using type "U" ? This certainly
> >> > works using "P" ...
> >> >
> >> > S='SELECT SOMEFILE WITH SOMETHING = "OOJIT"'
> >> > EXECUTE S RTNLIST MYLIST CAPTURING ANYOUTPUT
> >> > EOF=0
> >> > LOOP UNTIL EOF DO
> >> >   READNEXT MYID FROM MYLIST THEN
> >> > GSOUB MYMESS
> >> >   END ELSE EOF=1
> >> > REPEAT
> >> >
> >> > Martin
> >> >
> >> >
> >> > -Original Message-
> >> > From: u2-users-boun...@listserver.u2ug.org
> >> > [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Baker
> >> > Hughes
> >> > Sent: 24 September

Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

2012-09-24 Thread David A. Green
One thing to look out for is when using FORMLIST make sure your variable
ACTIVE.LIST has stuff in it.  Otherwise you get a null active list.

David A. Green
(480) 813-1725
DAG Consulting


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] 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.

On Mon, Sep 24, 2012 at 11:26 AM, Kevin King  wrote:

> And we have a winner!  Thank you everyone!  The READLIST and FORMLIST 
> will work; seems kinda kludgy, but hey, it's working.
>
>
> On Mon, Sep 24, 2012 at 11:21 AM, David A. Green 
>  > wrote:
>
>> If you already have an active list then you'll have to save it, then 
>> restore it.  See READLIST and FORMLIST.
>>
>> David A. Green
>> (480) 813-1725
>> DAG Consulting
>>
>> -Original Message-
>> From: u2-users-boun...@listserver.u2ug.org
>> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
>> Sent: Monday, September 24, 2012 10:11 AM
>> To: U2 Users List
>> Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists
>>
>> It's all fine if the program controls both lists, but in this case 
>> the
>> SUBR(..) type field could be accessed in just about any context, from 
>> TCL, from a download, from MITS, from another BASIC routine, with or 
>> without a select list...
>>
>> The RTNLIST doesn't solve the problem of my "select" command 
>> consuming the active list 0.  It seems that the PASSLIST extension to 
>> EXECUTE is designed specifically for this purpose, but it produces 
>> nothing but compilation
>> errors:
>>
>> CMD = "select ..."
>> EXECUTE CMD CAPTURING OUTPUT RTNLIST 2 PASSLIST 2
>>
>> ...produces a compilation error about the "misuse" of RTNLIST, 
>> despite the documentation saying this should be possible.
>>
>> The point is that I want to leave select list 0 entirely alone, which 
>> is why I'm using $BASICTYPE "U".  BASICTYPE "P" - standard on these 
>> SB+ systems - does not allow one to READNEXT from anything but list 
>> 0, and I want to leave list zero untouched.
>>
>> Gotta be a way, right?
>>
>> -K
>>
>> On Mon, Sep 24, 2012 at 10:56 AM, Martin Braid  wrote:
>>
>> > Hi Kevin, Any reason why you are using type "U" ? This certainly
>> > works using "P" ...
>> >
>> > S='SELECT SOMEFILE WITH SOMETHING = "OOJIT"'
>> > EXECUTE S RTNLIST MYLIST CAPTURING ANYOUTPUT
>> > EOF=0
>> > LOOP UNTIL EOF DO
>> >   READNEXT MYID FROM MYLIST THEN
>> > GSOUB MYMESS
>> >   END ELSE EOF=1
>> > REPEAT
>> >
>> > Martin
>> >
>> >
>> > -Original Message-
>> > From: u2-users-boun...@listserver.u2ug.org
>> > [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Baker 
>> > Hughes
>> > Sent: 24 September 2012 17:49
>> > To: 'U2 Users List'
>> > Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists
>> >
>> > Can you use SELECT yourfile WITH whatever TO 8 {specific list 
>> > number} in the master process, and let your SUBR virtual field 
>> > default to list
>> > 0 {zero}?
>> >
>> > The other option could be to do a READLIST within the SUBR function 
>> > and reset the list when RETURNing, but this could be onerous in 
>> > terms of processing speed.
>> >
>> > HTH
>> > -Baker
>> >
>> >
>> >
>> > -Original Message-
>> > From: u2-users-boun...@listserver.u2ug.org
>> > [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin 
>> > King
>> > Sent: Monday, September 24, 2012 11:43 AM
&

Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

2012-09-24 Thread Dave Davis
Aren't these nested selects kind of slow?

If the field in file b is indexed, I would use the SETINDEX and READFWD 
statements in place of the SELECT statement.  You are using Unidata, so unless 
you need to make this work for Universe as well that's what I would do.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
Sent: Monday, September 24, 2012 1:43 PM
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.

On Mon, Sep 24, 2012 at 11:26 AM, Kevin King  wrote:

> And we have a winner!  Thank you everyone!  The READLIST and FORMLIST
> will work; seems kinda kludgy, but hey, it's working.
>
>
> On Mon, Sep 24, 2012 at 11:21 AM, David A. Green
>  > wrote:
>
>> If you already have an active list then you'll have to save it, then
>> restore it.  See READLIST and FORMLIST.
>>
>> David A. Green
>> (480) 813-1725
>> DAG Consulting
>>
>> -Original Message-
>> From: u2-users-boun...@listserver.u2ug.org
>> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
>> Sent: Monday, September 24, 2012 10:11 AM
>> To: U2 Users List
>> Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists
>>
>> It's all fine if the program controls both lists, but in this case
>> the
>> SUBR(..) type field could be accessed in just about any context, from
>> TCL, from a download, from MITS, from another BASIC routine, with or
>> without a select list...
>>
>> The RTNLIST doesn't solve the problem of my "select" command
>> consuming the active list 0.  It seems that the PASSLIST extension to
>> EXECUTE is designed specifically for this purpose, but it produces
>> nothing but compilation
>> errors:
>>
>> CMD = "select ..."
>> EXECUTE CMD CAPTURING OUTPUT RTNLIST 2 PASSLIST 2
>>
>> ...produces a compilation error about the "misuse" of RTNLIST,
>> despite the documentation saying this should be possible.
>>
>> The point is that I want to leave select list 0 entirely alone, which
>> is why I'm using $BASICTYPE "U".  BASICTYPE "P" - standard on these
>> SB+ systems - does not allow one to READNEXT from anything but list
>> 0, and I want to leave list zero untouched.
>>
>> Gotta be a way, right?
>>
>> -K
>>
>> On Mon, Sep 24, 2012 at 10:56 AM, Martin Braid  wrote:
>>
>> > Hi Kevin, Any reason why you are using type "U" ? This certainly
>> > works using "P" ...
>> >
>> > S='SELECT SOMEFILE WITH SOMETHING = "OOJIT"'
>> > EXECUTE S RTNLIST MYLIST CAPTURING ANYOUTPUT
>> > EOF=0
>> > LOOP UNTIL EOF DO
>> >   READNEXT MYID FROM MYLIST THEN
>> > GSOUB MYMESS
>> >   END ELSE EOF=1
>> > REPEAT
>> >
>> > Martin
>> >
>> >
>> > -Original Message-
>> > From: u2-users-boun...@listserver.u2ug.org
>> > [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Baker
>> > Hughes
>> > Sent: 24 September 2012 17:49
>> > To: 'U2 Users List'
>> > Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists
>> >
>> > Can you use SELECT yourfile WITH whatever TO 8 {specific list
>> > number} in the master process, and let your SUBR virtual field
>> > default to list
>> > 0 {zero}?
>> >
>> > The other option could be to do a READLIST within the SUBR function
>> > and reset the list when RETURNing, but this could be onerous in
>> > terms of processing speed.
>> >
>> > HTH
>> > -Baker
>> >
>> >
>> >
>> > -Original Message-
>> > From: u2-users-boun...@listserver.u2ug.org
>> > [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin
>> > Ki

Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

2012-09-24 Thread Trevor Fulton
So the first Select (which you cannot control) will be to the default of
0 (or to anything), then you only need to EXECUTE to a named list in the
second EXECUTE.

Trevor.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
Sent: 24 September 2012 18:45
To: U2 Users List
Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

That may be applicable if we're controlling both lists, but in this
situation list 0 could come from anywhere.  We just need to be able to
execute a second list without blowing away list 0.

On Mon, Sep 24, 2012 at 11:44 AM, Trevor Fulton 
wrote:

> BASICTYPE M and P allows for named Select Lists, so you can
>
> EXECUTE SENTENCE RTNLIST WIP.LIST CAPTURING JUNK
>
> LOOP
> READNEXT WIP.ID FROM WIP.LIST ELSE EXIT
> CALL SUB1
> REPEAT
>
> So in SUB1 you can do another EXECUTE to another Named list.
>
> Trevor.
>
>
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
> Sent: 24 September 2012 17:43
> To: U2 Users List
> Subject: [U2] Unidata 7.1.16 Multiple Active Select Lists
>
> How does one manage multiple active select lists in Unidata?  I could 
> have sworn I've done this before, but for some reason it's not working

> at all as I recall.
>
> I have this SUBR(..) type field in file A that selects records from 
> file B to calculate an aggregate.  This works fine when listing file A

> and showing the field.  However, if there's an active select list when

> file A is listed with this field, the select statement in my SUBR(..) 
> is consuming the active select list 0 and returning incorrect results.
>
> My subroutine is $BASICTYPE "U" and is selecting records using the 
> lower case select and selecting to active list #3.  It then processes 
> from list
> #3 and returns its result.  I've tried using the RTNLIST and PASSLIST 
> options on the EXECUTE statements and I get a "Misuse of Reserved Word

> 'PASSLIST'" or "Misuse of Reserved Word 'RTNLIST'".  I've tried 
> UDTEXECUTE with no compilation errors but also no improvement on the 
> problem.  I've even tried MDPERFORM but I get the misuse errors with 
> the RTNLIST and PASSLIST options.  Oddly enough, removing $BASICTYPE 
> "U" I don't get an error on MDPERFORM but I can't READNEXT from a 
> numbered select without the $BASICTYPE "U".
>
> How should I structure this SUBR(..) so that it does not consume list 
> 0 when selecting to list 3?
> ___
> U2-Users mailing list
> U2-Users@listserver.u2ug.org
> http://listserver.u2ug.org/mailman/listinfo/u2-users
>
>
> Click
> https://www.mailcontrol.com/sr/wQw0zmjPoHdJTZGyOCrrhg==
> mzYSmfEz!grmb2Vr9yuNyLUcPPmbfFPdrr1lqOECv!Swg==  to report this email 
> as spam.
> 
>
> Epicor Software (UK) is a limited company registered in England &
Wales.
> Registration Number: 2338274.   Registered Office:  6th Floor, One
London
> Wall, London EC2Y 5EB
> This e-mail is for the use of the intended recipient(s) only. If you 
> have received this e-mail in error, please notify the sender 
> immediately and then delete it. If you are not the intended recipient,

> you must not use, disclose or distribute this e-mail without the
author's prior permission.
> We have taken precautions to minimize the risk of transmitting 
> software viruses, but we advise you to carry out your own virus checks

> on any attachment to this message. We cannot accept liability for any 
> loss or damage caused by software viruses. Any views and/or opinions 
> expressed in this e-mail are of the author only and do not represent 
> the views of Epicor Software (UK) Limited or any other company within
its group.
>
>
> This message has been scanned for malware by Websense. 
> www.websense.com ___
> 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


Epicor Software (UK) is a limited company registered in England & Wales.  
Registration Number: 2338274.   Registered Office:  6th Floor, One London Wall, 
London EC2Y 5EB 
This e-mail is for the use of the intended recipient(s) only. If you have 
received this e-mail in error, please notify the sender immediately and then 
delete it. I

Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

2012-09-24 Thread Kevin King
That may be applicable if we're controlling both lists, but in this
situation list 0 could come from anywhere.  We just need to be able to
execute a second list without blowing away list 0.

On Mon, Sep 24, 2012 at 11:44 AM, Trevor Fulton  wrote:

> BASICTYPE M and P allows for named Select Lists, so you can
>
> EXECUTE SENTENCE RTNLIST WIP.LIST CAPTURING JUNK
>
> LOOP
> READNEXT WIP.ID FROM WIP.LIST ELSE EXIT
> CALL SUB1
> REPEAT
>
> So in SUB1 you can do another EXECUTE to another Named list.
>
> Trevor.
>
>
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
> Sent: 24 September 2012 17:43
> To: U2 Users List
> Subject: [U2] Unidata 7.1.16 Multiple Active Select Lists
>
> How does one manage multiple active select lists in Unidata?  I could
> have sworn I've done this before, but for some reason it's not working
> at all as I recall.
>
> I have this SUBR(..) type field in file A that selects records from file
> B to calculate an aggregate.  This works fine when listing file A and
> showing the field.  However, if there's an active select list when file
> A is listed with this field, the select statement in my SUBR(..) is
> consuming the active select list 0 and returning incorrect results.
>
> My subroutine is $BASICTYPE "U" and is selecting records using the lower
> case select and selecting to active list #3.  It then processes from
> list
> #3 and returns its result.  I've tried using the RTNLIST and PASSLIST
> options on the EXECUTE statements and I get a "Misuse of Reserved Word
> 'PASSLIST'" or "Misuse of Reserved Word 'RTNLIST'".  I've tried
> UDTEXECUTE with no compilation errors but also no improvement on the
> problem.  I've even tried MDPERFORM but I get the misuse errors with the
> RTNLIST and PASSLIST options.  Oddly enough, removing $BASICTYPE "U" I
> don't get an error on MDPERFORM but I can't READNEXT from a numbered
> select without the $BASICTYPE "U".
>
> How should I structure this SUBR(..) so that it does not consume list 0
> when selecting to list 3?
> ___
> U2-Users mailing list
> U2-Users@listserver.u2ug.org
> http://listserver.u2ug.org/mailman/listinfo/u2-users
>
>
> Click
> https://www.mailcontrol.com/sr/wQw0zmjPoHdJTZGyOCrrhg==
> mzYSmfEz!grmb2Vr9yuNyLUcPPmbfFPdrr1lqOECv!Swg==  to report this email as
> spam.
> 
>
> Epicor Software (UK) is a limited company registered in England & Wales.
> Registration Number: 2338274.   Registered Office:  6th Floor, One London
> Wall, London EC2Y 5EB
> This e-mail is for the use of the intended recipient(s) only. If you have
> received this e-mail in error, please notify the sender immediately and
> then delete it. If you are not the intended recipient, you must not use,
> disclose or distribute this e-mail without the author's prior permission.
> We have taken precautions to minimize the risk of transmitting software
> viruses, but we advise you to carry out your own virus checks on any
> attachment to this message. We cannot accept liability for any loss or
> damage caused by software viruses. Any views and/or opinions expressed in
> this e-mail are of the author only and do not represent the views of Epicor
> Software (UK) Limited or any other company within its group.
>
>
> This message has been scanned for malware by Websense. www.websense.com
> ___
> 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


Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

2012-09-24 Thread Trevor Fulton
BASICTYPE M and P allows for named Select Lists, so you can

EXECUTE SENTENCE RTNLIST WIP.LIST CAPTURING JUNK

LOOP 
READNEXT WIP.ID FROM WIP.LIST ELSE EXIT 
CALL SUB1
REPEAT

So in SUB1 you can do another EXECUTE to another Named list.

Trevor.


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
Sent: 24 September 2012 17:43
To: U2 Users List
Subject: [U2] Unidata 7.1.16 Multiple Active Select Lists

How does one manage multiple active select lists in Unidata?  I could
have sworn I've done this before, but for some reason it's not working
at all as I recall.

I have this SUBR(..) type field in file A that selects records from file
B to calculate an aggregate.  This works fine when listing file A and
showing the field.  However, if there's an active select list when file
A is listed with this field, the select statement in my SUBR(..) is
consuming the active select list 0 and returning incorrect results.

My subroutine is $BASICTYPE "U" and is selecting records using the lower
case select and selecting to active list #3.  It then processes from
list
#3 and returns its result.  I've tried using the RTNLIST and PASSLIST
options on the EXECUTE statements and I get a "Misuse of Reserved Word
'PASSLIST'" or "Misuse of Reserved Word 'RTNLIST'".  I've tried
UDTEXECUTE with no compilation errors but also no improvement on the
problem.  I've even tried MDPERFORM but I get the misuse errors with the
RTNLIST and PASSLIST options.  Oddly enough, removing $BASICTYPE "U" I
don't get an error on MDPERFORM but I can't READNEXT from a numbered
select without the $BASICTYPE "U".

How should I structure this SUBR(..) so that it does not consume list 0
when selecting to list 3?
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Click
https://www.mailcontrol.com/sr/wQw0zmjPoHdJTZGyOCrrhg==
mzYSmfEz!grmb2Vr9yuNyLUcPPmbfFPdrr1lqOECv!Swg==  to report this email as
spam.


Epicor Software (UK) is a limited company registered in England & Wales.  
Registration Number: 2338274.   Registered Office:  6th Floor, One London Wall, 
London EC2Y 5EB 
This e-mail is for the use of the intended recipient(s) only. If you have 
received this e-mail in error, please notify the sender immediately and then 
delete it. If you are not the intended recipient, you must not use, disclose or 
distribute this e-mail without the author's prior permission. We have taken 
precautions to minimize the risk of transmitting software viruses, but we 
advise you to carry out your own virus checks on any attachment to this 
message. We cannot accept liability for any loss or damage caused by software 
viruses. Any views and/or opinions expressed in this e-mail are of the author 
only and do not represent the views of Epicor Software (UK) Limited or any 
other company within its group.


This message has been scanned for malware by Websense. www.websense.com
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

2012-09-24 Thread Kevin King
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.

On Mon, Sep 24, 2012 at 11:26 AM, Kevin King  wrote:

> And we have a winner!  Thank you everyone!  The READLIST and FORMLIST will
> work; seems kinda kludgy, but hey, it's working.
>
>
> On Mon, Sep 24, 2012 at 11:21 AM, David A. Green  > wrote:
>
>> If you already have an active list then you'll have to save it, then
>> restore
>> it.  See READLIST and FORMLIST.
>>
>> David A. Green
>> (480) 813-1725
>> DAG Consulting
>>
>> -Original Message-
>> From: u2-users-boun...@listserver.u2ug.org
>> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
>> Sent: Monday, September 24, 2012 10:11 AM
>> To: U2 Users List
>> Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists
>>
>> It's all fine if the program controls both lists, but in this case the
>> SUBR(..) type field could be accessed in just about any context, from TCL,
>> from a download, from MITS, from another BASIC routine, with or without a
>> select list...
>>
>> The RTNLIST doesn't solve the problem of my "select" command consuming the
>> active list 0.  It seems that the PASSLIST extension to EXECUTE is
>> designed
>> specifically for this purpose, but it produces nothing but compilation
>> errors:
>>
>> CMD = "select ..."
>> EXECUTE CMD CAPTURING OUTPUT RTNLIST 2 PASSLIST 2
>>
>> ...produces a compilation error about the "misuse" of RTNLIST, despite the
>> documentation saying this should be possible.
>>
>> The point is that I want to leave select list 0 entirely alone, which is
>> why
>> I'm using $BASICTYPE "U".  BASICTYPE "P" - standard on these SB+ systems -
>> does not allow one to READNEXT from anything but list 0, and I want to
>> leave
>> list zero untouched.
>>
>> Gotta be a way, right?
>>
>> -K
>>
>> On Mon, Sep 24, 2012 at 10:56 AM, Martin Braid  wrote:
>>
>> > Hi Kevin, Any reason why you are using type "U" ? This certainly
>> > works using "P" ...
>> >
>> > S='SELECT SOMEFILE WITH SOMETHING = "OOJIT"'
>> > EXECUTE S RTNLIST MYLIST CAPTURING ANYOUTPUT
>> > EOF=0
>> > LOOP UNTIL EOF DO
>> >   READNEXT MYID FROM MYLIST THEN
>> > GSOUB MYMESS
>> >   END ELSE EOF=1
>> > REPEAT
>> >
>> > Martin
>> >
>> >
>> > -Original Message-
>> > From: u2-users-boun...@listserver.u2ug.org
>> > [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Baker
>> > Hughes
>> > Sent: 24 September 2012 17:49
>> > To: 'U2 Users List'
>> > Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists
>> >
>> > Can you use SELECT yourfile WITH whatever TO 8 {specific list number}
>> > in the master process, and let your SUBR virtual field default to list
>> > 0 {zero}?
>> >
>> > The other option could be to do a READLIST within the SUBR function
>> > and reset the list when RETURNing, but this could be onerous in terms
>> > of processing speed.
>> >
>> > HTH
>> > -Baker
>> >
>> >
>> >
>> > -Original Message-
>> > From: u2-users-boun...@listserver.u2ug.org
>> > [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
>> > Sent: Monday, September 24, 2012 11:43 AM
>> > To: U2 Users List
>> > Subject: [U2] Unidata 7.1.16 Multiple Active Select Lists
>> >
>> > How does one manage multiple active select lists in Unidata?  I could
>> > have sworn I've done this before, but for some reason it's not working
>> > at all as I recall.
>> >
>> > I have this SUBR(..) type field in file A that selects records from
>> > file B to calculate an aggregate.  This works fine when lis

Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

2012-09-24 Thread Kevin King
And we have a winner!  Thank you everyone!  The READLIST and FORMLIST will
work; seems kinda kludgy, but hey, it's working.

On Mon, Sep 24, 2012 at 11:21 AM, David A. Green
wrote:

> If you already have an active list then you'll have to save it, then
> restore
> it.  See READLIST and FORMLIST.
>
> David A. Green
> (480) 813-1725
> DAG Consulting
>
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
> Sent: Monday, September 24, 2012 10:11 AM
> To: U2 Users List
> Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists
>
> It's all fine if the program controls both lists, but in this case the
> SUBR(..) type field could be accessed in just about any context, from TCL,
> from a download, from MITS, from another BASIC routine, with or without a
> select list...
>
> The RTNLIST doesn't solve the problem of my "select" command consuming the
> active list 0.  It seems that the PASSLIST extension to EXECUTE is designed
> specifically for this purpose, but it produces nothing but compilation
> errors:
>
> CMD = "select ..."
> EXECUTE CMD CAPTURING OUTPUT RTNLIST 2 PASSLIST 2
>
> ...produces a compilation error about the "misuse" of RTNLIST, despite the
> documentation saying this should be possible.
>
> The point is that I want to leave select list 0 entirely alone, which is
> why
> I'm using $BASICTYPE "U".  BASICTYPE "P" - standard on these SB+ systems -
> does not allow one to READNEXT from anything but list 0, and I want to
> leave
> list zero untouched.
>
> Gotta be a way, right?
>
> -K
>
> On Mon, Sep 24, 2012 at 10:56 AM, Martin Braid  wrote:
>
> > Hi Kevin, Any reason why you are using type "U" ? This certainly
> > works using "P" ...
> >
> > S='SELECT SOMEFILE WITH SOMETHING = "OOJIT"'
> > EXECUTE S RTNLIST MYLIST CAPTURING ANYOUTPUT
> > EOF=0
> > LOOP UNTIL EOF DO
> >   READNEXT MYID FROM MYLIST THEN
> > GSOUB MYMESS
> >   END ELSE EOF=1
> > REPEAT
> >
> > Martin
> >
> >
> > -Original Message-
> > From: u2-users-boun...@listserver.u2ug.org
> > [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Baker
> > Hughes
> > Sent: 24 September 2012 17:49
> > To: 'U2 Users List'
> > Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists
> >
> > Can you use SELECT yourfile WITH whatever TO 8 {specific list number}
> > in the master process, and let your SUBR virtual field default to list
> > 0 {zero}?
> >
> > The other option could be to do a READLIST within the SUBR function
> > and reset the list when RETURNing, but this could be onerous in terms
> > of processing speed.
> >
> > HTH
> > -Baker
> >
> >
> >
> > -Original Message-
> > From: u2-users-boun...@listserver.u2ug.org
> > [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
> > Sent: Monday, September 24, 2012 11:43 AM
> > To: U2 Users List
> > Subject: [U2] Unidata 7.1.16 Multiple Active Select Lists
> >
> > How does one manage multiple active select lists in Unidata?  I could
> > have sworn I've done this before, but for some reason it's not working
> > at all as I recall.
> >
> > I have this SUBR(..) type field in file A that selects records from
> > file B to calculate an aggregate.  This works fine when listing file A
> > and showing the field.  However, if there's an active select list when
> > file A is listed with this field, the select statement in my SUBR(..)
> > is consuming the active select list 0 and returning incorrect results.
> >
> > My subroutine is $BASICTYPE "U" and is selecting records using the
> > lower case select and selecting to active list #3.  It then processes
> > from list
> > #3 and returns its result.  I've tried using the RTNLIST and PASSLIST
> > options on the EXECUTE statements and I get a "Misuse of Reserved Word
> > 'PASSLIST'" or "Misuse of Reserved Word 'RTNLIST'".  I've tried
> > UDTEXECUTE with no compilation errors but also no improvement on the
> > problem.  I've even tried MDPERFORM but I get the misuse errors with
> > the RTNLIST and PASSLIST options.  Oddly enough, removing $BASICTYPE
> > "U" I don't get an error on MDPERFORM but I can't READNEXT from a
> > numbered select without the $BASICTYPE "U".
> >
&g

Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

2012-09-24 Thread David A. Green
If you already have an active list then you'll have to save it, then restore
it.  See READLIST and FORMLIST.

David A. Green
(480) 813-1725
DAG Consulting

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
Sent: Monday, September 24, 2012 10:11 AM
To: U2 Users List
Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

It's all fine if the program controls both lists, but in this case the
SUBR(..) type field could be accessed in just about any context, from TCL,
from a download, from MITS, from another BASIC routine, with or without a
select list...

The RTNLIST doesn't solve the problem of my "select" command consuming the
active list 0.  It seems that the PASSLIST extension to EXECUTE is designed
specifically for this purpose, but it produces nothing but compilation
errors:

CMD = "select ..."
EXECUTE CMD CAPTURING OUTPUT RTNLIST 2 PASSLIST 2

...produces a compilation error about the "misuse" of RTNLIST, despite the
documentation saying this should be possible.

The point is that I want to leave select list 0 entirely alone, which is why
I'm using $BASICTYPE "U".  BASICTYPE "P" - standard on these SB+ systems -
does not allow one to READNEXT from anything but list 0, and I want to leave
list zero untouched.

Gotta be a way, right?

-K

On Mon, Sep 24, 2012 at 10:56 AM, Martin Braid  wrote:

> Hi Kevin, Any reason why you are using type "U" ? This certainly
> works using "P" ...
>
> S='SELECT SOMEFILE WITH SOMETHING = "OOJIT"'
> EXECUTE S RTNLIST MYLIST CAPTURING ANYOUTPUT
> EOF=0
> LOOP UNTIL EOF DO
>   READNEXT MYID FROM MYLIST THEN
> GSOUB MYMESS
>   END ELSE EOF=1
> REPEAT
>
> Martin
>
>
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Baker 
> Hughes
> Sent: 24 September 2012 17:49
> To: 'U2 Users List'
> Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists
>
> Can you use SELECT yourfile WITH whatever TO 8 {specific list number} 
> in the master process, and let your SUBR virtual field default to list 
> 0 {zero}?
>
> The other option could be to do a READLIST within the SUBR function 
> and reset the list when RETURNing, but this could be onerous in terms 
> of processing speed.
>
> HTH
> -Baker
>
>
>
> -Original Message-----
> From: u2-users-boun...@listserver.u2ug.org
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
> Sent: Monday, September 24, 2012 11:43 AM
> To: U2 Users List
> Subject: [U2] Unidata 7.1.16 Multiple Active Select Lists
>
> How does one manage multiple active select lists in Unidata?  I could 
> have sworn I've done this before, but for some reason it's not working 
> at all as I recall.
>
> I have this SUBR(..) type field in file A that selects records from 
> file B to calculate an aggregate.  This works fine when listing file A 
> and showing the field.  However, if there's an active select list when 
> file A is listed with this field, the select statement in my SUBR(..) 
> is consuming the active select list 0 and returning incorrect results.
>
> My subroutine is $BASICTYPE "U" and is selecting records using the 
> lower case select and selecting to active list #3.  It then processes 
> from list
> #3 and returns its result.  I've tried using the RTNLIST and PASSLIST 
> options on the EXECUTE statements and I get a "Misuse of Reserved Word 
> 'PASSLIST'" or "Misuse of Reserved Word 'RTNLIST'".  I've tried 
> UDTEXECUTE with no compilation errors but also no improvement on the 
> problem.  I've even tried MDPERFORM but I get the misuse errors with 
> the RTNLIST and PASSLIST options.  Oddly enough, removing $BASICTYPE 
> "U" I don't get an error on MDPERFORM but I can't READNEXT from a 
> numbered select without the $BASICTYPE "U".
>
> How should I structure this SUBR(..) so that it does not consume list 
> 0 when selecting to list 3?
> ___
> U2-Users mailing list
> U2-Users@listserver.u2ug.org
> http://listserver.u2ug.org/mailman/listinfo/u2-users
>
> 
>
> This communication, its contents and any file attachments transmitted 
> with it are intended solely for the addressee(s) and may contain 
> confidential proprietary information.
> Access by any other party without the express written permission of 
> the sender is STRICTLY PROHIBITED.
> If you have received this c

Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

2012-09-24 Thread Kevin King
It's all fine if the program controls both lists, but in this case the
SUBR(..) type field could be accessed in just about any context, from TCL,
from a download, from MITS, from another BASIC routine, with or without a
select list...

The RTNLIST doesn't solve the problem of my "select" command consuming the
active list 0.  It seems that the PASSLIST extension to EXECUTE is designed
specifically for this purpose, but it produces nothing but compilation
errors:

CMD = "select ..."
EXECUTE CMD CAPTURING OUTPUT RTNLIST 2 PASSLIST 2

...produces a compilation error about the "misuse" of RTNLIST, despite the
documentation saying this should be possible.

The point is that I want to leave select list 0 entirely alone, which is
why I'm using $BASICTYPE "U".  BASICTYPE "P" - standard on these SB+
systems - does not allow one to READNEXT from anything but list 0, and I
want to leave list zero untouched.

Gotta be a way, right?

-K

On Mon, Sep 24, 2012 at 10:56 AM, Martin Braid  wrote:

> Hi Kevin, Any reason why you are using type "U" ? This certainly
> works using "P" ...
>
> S='SELECT SOMEFILE WITH SOMETHING = "OOJIT"'
> EXECUTE S RTNLIST MYLIST CAPTURING ANYOUTPUT
> EOF=0
> LOOP UNTIL EOF DO
>   READNEXT MYID FROM MYLIST THEN
> GSOUB MYMESS
>   END ELSE EOF=1
> REPEAT
>
> Martin
>
>
> -Original Message-
> From: u2-users-boun...@listserver.u2ug.org
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Baker Hughes
> Sent: 24 September 2012 17:49
> To: 'U2 Users List'
> Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists
>
> Can you use SELECT yourfile WITH whatever TO 8 {specific list number} in
> the master process, and let your SUBR virtual field default to list 0
> {zero}?
>
> The other option could be to do a READLIST within the SUBR function and
> reset the list when RETURNing, but this could be onerous in terms of
> processing speed.
>
> HTH
> -Baker
>
>
>
> -Original Message-----
> From: u2-users-boun...@listserver.u2ug.org
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
> Sent: Monday, September 24, 2012 11:43 AM
> To: U2 Users List
> Subject: [U2] Unidata 7.1.16 Multiple Active Select Lists
>
> How does one manage multiple active select lists in Unidata?  I could
> have sworn I've done this before, but for some reason it's not working
> at all as I recall.
>
> I have this SUBR(..) type field in file A that selects records from file
> B to calculate an aggregate.  This works fine when listing file A and
> showing the field.  However, if there's an active select list when file
> A is listed with this field, the select statement in my SUBR(..) is
> consuming the active select list 0 and returning incorrect results.
>
> My subroutine is $BASICTYPE "U" and is selecting records using the lower
> case select and selecting to active list #3.  It then processes from
> list
> #3 and returns its result.  I've tried using the RTNLIST and PASSLIST
> options on the EXECUTE statements and I get a "Misuse of Reserved Word
> 'PASSLIST'" or "Misuse of Reserved Word 'RTNLIST'".  I've tried
> UDTEXECUTE with no compilation errors but also no improvement on the
> problem.  I've even tried MDPERFORM but I get the misuse errors with the
> RTNLIST and PASSLIST options.  Oddly enough, removing $BASICTYPE "U" I
> don't get an error on MDPERFORM but I can't READNEXT from a numbered
> select without the $BASICTYPE "U".
>
> How should I structure this SUBR(..) so that it does not consume list 0
> when selecting to list 3?
> ___
> U2-Users mailing list
> U2-Users@listserver.u2ug.org
> http://listserver.u2ug.org/mailman/listinfo/u2-users
>
> 
>
> This communication, its contents and any file attachments transmitted
> with it are intended solely for the addressee(s) and may contain
> confidential proprietary information.
> Access by any other party without the express written permission of the
> sender is STRICTLY PROHIBITED.
> If you have received this communication in error you may not copy,
> distribute or use the contents, attachments or information in any way.
> Please destroy it and contact the sender.
> ___
> U2-Users mailing list
> U2-Users@listserver.u2ug.org
> http://listserver.u2ug.org/mailman/listinfo/u2-users
>
>
> Click
> https://www.mailcontrol.com/sr/wQw0zmjPoHdJTZGyOCrrhg==
> 04y!LlOoL8USVGrPZehFfPKcPPmbfFPdrr1lqOECv!Swg==  to report this email as
> 

Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

2012-09-24 Thread Martin Braid
Hi Kevin, Any reason why you are using type "U" ? This certainly
works using "P" ...

S='SELECT SOMEFILE WITH SOMETHING = "OOJIT"'
EXECUTE S RTNLIST MYLIST CAPTURING ANYOUTPUT
EOF=0
LOOP UNTIL EOF DO
  READNEXT MYID FROM MYLIST THEN
GSOUB MYMESS
  END ELSE EOF=1
REPEAT

Martin


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Baker Hughes
Sent: 24 September 2012 17:49
To: 'U2 Users List'
Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

Can you use SELECT yourfile WITH whatever TO 8 {specific list number} in
the master process, and let your SUBR virtual field default to list 0
{zero}?

The other option could be to do a READLIST within the SUBR function and
reset the list when RETURNing, but this could be onerous in terms of
processing speed.

HTH
-Baker



-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
Sent: Monday, September 24, 2012 11:43 AM
To: U2 Users List
Subject: [U2] Unidata 7.1.16 Multiple Active Select Lists

How does one manage multiple active select lists in Unidata?  I could
have sworn I've done this before, but for some reason it's not working
at all as I recall.

I have this SUBR(..) type field in file A that selects records from file
B to calculate an aggregate.  This works fine when listing file A and
showing the field.  However, if there's an active select list when file
A is listed with this field, the select statement in my SUBR(..) is
consuming the active select list 0 and returning incorrect results.

My subroutine is $BASICTYPE "U" and is selecting records using the lower
case select and selecting to active list #3.  It then processes from
list
#3 and returns its result.  I've tried using the RTNLIST and PASSLIST
options on the EXECUTE statements and I get a "Misuse of Reserved Word
'PASSLIST'" or "Misuse of Reserved Word 'RTNLIST'".  I've tried
UDTEXECUTE with no compilation errors but also no improvement on the
problem.  I've even tried MDPERFORM but I get the misuse errors with the
RTNLIST and PASSLIST options.  Oddly enough, removing $BASICTYPE "U" I
don't get an error on MDPERFORM but I can't READNEXT from a numbered
select without the $BASICTYPE "U".

How should I structure this SUBR(..) so that it does not consume list 0
when selecting to list 3?
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users



This communication, its contents and any file attachments transmitted
with it are intended solely for the addressee(s) and may contain
confidential proprietary information.
Access by any other party without the express written permission of the
sender is STRICTLY PROHIBITED.
If you have received this communication in error you may not copy,
distribute or use the contents, attachments or information in any way.
Please destroy it and contact the sender.
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Click
https://www.mailcontrol.com/sr/wQw0zmjPoHdJTZGyOCrrhg==
04y!LlOoL8USVGrPZehFfPKcPPmbfFPdrr1lqOECv!Swg==  to report this email as
spam.


Epicor Software (UK) is a limited company registered in England & Wales.  
Registration Number: 2338274.   Registered Office:  6th Floor, One London Wall, 
London EC2Y 5EB 
This e-mail is for the use of the intended recipient(s) only. If you have 
received this e-mail in error, please notify the sender immediately and then 
delete it. If you are not the intended recipient, you must not use, disclose or 
distribute this e-mail without the author's prior permission. We have taken 
precautions to minimize the risk of transmitting software viruses, but we 
advise you to carry out your own virus checks on any attachment to this 
message. We cannot accept liability for any loss or damage caused by software 
viruses. Any views and/or opinions expressed in this e-mail are of the author 
only and do not represent the views of Epicor Software (UK) Limited or any 
other company within its group.


This message has been scanned for malware by Websense. www.websense.com
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

2012-09-24 Thread David Wolverton
And I think it's more on the 'READNEXT' and the 'FROM' that I've seen the
issue, by the way...

Any place in BASIC (not the ECL-level stuff) seems to not like the 'actual
numeric' -- but a variable works fine.

YMMV -- just something I've seen.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of David Wolverton 
Sent: Monday, September 24, 2012 11:53 AM
To: 'U2 Users List'
Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

I've found that "TO 8" does not work...

HOWEVER...

LISTNO = 8
TO LISTNO

Works fine... always meant to ask Rocket why I have that issue, but just
worked around it as shown.

DW

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Baker Hughes
Sent: Monday, September 24, 2012 11:49 AM
To: 'U2 Users List'
Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

Can you use SELECT yourfile WITH whatever TO 8 {specific list number} in the
master process, and let your SUBR virtual field default to list 0 {zero}?

The other option could be to do a READLIST within the SUBR function and
reset the list when RETURNing, but this could be onerous in terms of
processing speed.

HTH
-Baker



-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
Sent: Monday, September 24, 2012 11:43 AM
To: U2 Users List
Subject: [U2] Unidata 7.1.16 Multiple Active Select Lists

How does one manage multiple active select lists in Unidata?  I could have
sworn I've done this before, but for some reason it's not working at all as
I recall.

I have this SUBR(..) type field in file A that selects records from file B
to calculate an aggregate.  This works fine when listing file A and showing
the field.  However, if there's an active select list when file A is listed
with this field, the select statement in my SUBR(..) is consuming the active
select list 0 and returning incorrect results.

My subroutine is $BASICTYPE "U" and is selecting records using the lower
case select and selecting to active list #3.  It then processes from list
#3 and returns its result.  I've tried using the RTNLIST and PASSLIST
options on the EXECUTE statements and I get a "Misuse of Reserved Word
'PASSLIST'" or "Misuse of Reserved Word 'RTNLIST'".  I've tried UDTEXECUTE
with no compilation errors but also no improvement on the problem.  I've
even tried MDPERFORM but I get the misuse errors with the RTNLIST and
PASSLIST options.  Oddly enough, removing $BASICTYPE "U" I don't get an
error on MDPERFORM but I can't READNEXT from a numbered select without the
$BASICTYPE "U".

How should I structure this SUBR(..) so that it does not consume list 0 when
selecting to list 3?
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users



This communication, its contents and any file attachments transmitted with
it are intended solely for the addressee(s) and may contain confidential
proprietary information.
Access by any other party without the express written permission of the
sender is STRICTLY PROHIBITED.
If you have received this communication in error you may not copy,
distribute or use the contents, attachments or information in any way.
Please destroy it and contact the sender.
___
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

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

2012-09-24 Thread David Wolverton
I've found that "TO 8" does not work...

HOWEVER...

LISTNO = 8
TO LISTNO

Works fine... always meant to ask Rocket why I have that issue, but just
worked around it as shown.

DW

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Baker Hughes
Sent: Monday, September 24, 2012 11:49 AM
To: 'U2 Users List'
Subject: Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

Can you use SELECT yourfile WITH whatever TO 8 {specific list number} in the
master process, and let your SUBR virtual field default to list 0 {zero}?

The other option could be to do a READLIST within the SUBR function and
reset the list when RETURNing, but this could be onerous in terms of
processing speed.

HTH
-Baker



-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
Sent: Monday, September 24, 2012 11:43 AM
To: U2 Users List
Subject: [U2] Unidata 7.1.16 Multiple Active Select Lists

How does one manage multiple active select lists in Unidata?  I could have
sworn I've done this before, but for some reason it's not working at all as
I recall.

I have this SUBR(..) type field in file A that selects records from file B
to calculate an aggregate.  This works fine when listing file A and showing
the field.  However, if there's an active select list when file A is listed
with this field, the select statement in my SUBR(..) is consuming the active
select list 0 and returning incorrect results.

My subroutine is $BASICTYPE "U" and is selecting records using the lower
case select and selecting to active list #3.  It then processes from list
#3 and returns its result.  I've tried using the RTNLIST and PASSLIST
options on the EXECUTE statements and I get a "Misuse of Reserved Word
'PASSLIST'" or "Misuse of Reserved Word 'RTNLIST'".  I've tried UDTEXECUTE
with no compilation errors but also no improvement on the problem.  I've
even tried MDPERFORM but I get the misuse errors with the RTNLIST and
PASSLIST options.  Oddly enough, removing $BASICTYPE "U" I don't get an
error on MDPERFORM but I can't READNEXT from a numbered select without the
$BASICTYPE "U".

How should I structure this SUBR(..) so that it does not consume list 0 when
selecting to list 3?
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users



This communication, its contents and any file attachments transmitted with
it are intended solely for the addressee(s) and may contain confidential
proprietary information.
Access by any other party without the express written permission of the
sender is STRICTLY PROHIBITED.
If you have received this communication in error you may not copy,
distribute or use the contents, attachments or information in any way.
Please destroy it and contact the sender.
___
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


Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

2012-09-24 Thread David A. Green
By definition you can only have one active list at a time in UniData.

But you can use list 1-9 in your subroutine (or at TCL) by using the TO and
FROM keywords.

PERFORM "SELECT CUSTOMERS WITH STATE = 'CO' TO 1"
LOOP
  READNEXT CUST.KEY FROM 1 ELSE ...

David A. Green
(480) 813-1725
DAG Consulting

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
Sent: Monday, September 24, 2012 9:43 AM
To: U2 Users List
Subject: [U2] Unidata 7.1.16 Multiple Active Select Lists

How does one manage multiple active select lists in Unidata?  I could have
sworn I've done this before, but for some reason it's not working at all as
I recall.

I have this SUBR(..) type field in file A that selects records from file B
to calculate an aggregate.  This works fine when listing file A and showing
the field.  However, if there's an active select list when file A is listed
with this field, the select statement in my SUBR(..) is consuming the active
select list 0 and returning incorrect results.

My subroutine is $BASICTYPE "U" and is selecting records using the lower
case select and selecting to active list #3.  It then processes from list
#3 and returns its result.  I've tried using the RTNLIST and PASSLIST
options on the EXECUTE statements and I get a "Misuse of Reserved Word
'PASSLIST'" or "Misuse of Reserved Word 'RTNLIST'".  I've tried UDTEXECUTE
with no compilation errors but also no improvement on the problem.  I've
even tried MDPERFORM but I get the misuse errors with the RTNLIST and
PASSLIST options.  Oddly enough, removing $BASICTYPE "U" I don't get an
error on MDPERFORM but I can't READNEXT from a numbered select without the
$BASICTYPE "U".

How should I structure this SUBR(..) so that it does not consume list 0 when
selecting to list 3?
___
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


Re: [U2] Unidata 7.1.16 Multiple Active Select Lists

2012-09-24 Thread Baker Hughes
Can you use SELECT yourfile WITH whatever TO 8 {specific list number} in the 
master process, and let your SUBR virtual field default to list 0 {zero}?

The other option could be to do a READLIST within the SUBR function and reset 
the list when RETURNing, but this could be onerous in terms of processing speed.

HTH
-Baker



-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
Sent: Monday, September 24, 2012 11:43 AM
To: U2 Users List
Subject: [U2] Unidata 7.1.16 Multiple Active Select Lists

How does one manage multiple active select lists in Unidata?  I could have 
sworn I've done this before, but for some reason it's not working at all as I 
recall.

I have this SUBR(..) type field in file A that selects records from file B to 
calculate an aggregate.  This works fine when listing file A and showing the 
field.  However, if there's an active select list when file A is listed with 
this field, the select statement in my SUBR(..) is consuming the active select 
list 0 and returning incorrect results.

My subroutine is $BASICTYPE "U" and is selecting records using the lower case 
select and selecting to active list #3.  It then processes from list
#3 and returns its result.  I've tried using the RTNLIST and PASSLIST options 
on the EXECUTE statements and I get a "Misuse of Reserved Word 'PASSLIST'" or 
"Misuse of Reserved Word 'RTNLIST'".  I've tried UDTEXECUTE with no compilation 
errors but also no improvement on the problem.  I've even tried MDPERFORM but I 
get the misuse errors with the RTNLIST and PASSLIST options.  Oddly enough, 
removing $BASICTYPE "U" I don't get an error on MDPERFORM but I can't READNEXT 
from a numbered select without the $BASICTYPE "U".

How should I structure this SUBR(..) so that it does not consume list 0 when 
selecting to list 3?
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users



This communication, its contents and any file attachments transmitted with it 
are intended solely for the addressee(s) and may contain confidential 
proprietary information.
Access by any other party without the express written permission of the sender 
is STRICTLY PROHIBITED.
If you have received this communication in error you may not copy, distribute 
or use the contents, attachments or information in any way. Please destroy it 
and contact the sender.
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


[U2] Unidata 7.1.16 Multiple Active Select Lists

2012-09-24 Thread Kevin King
How does one manage multiple active select lists in Unidata?  I could have
sworn I've done this before, but for some reason it's not working at all as
I recall.

I have this SUBR(..) type field in file A that selects records from file B
to calculate an aggregate.  This works fine when listing file A and showing
the field.  However, if there's an active select list when file A is listed
with this field, the select statement in my SUBR(..) is consuming the
active select list 0 and returning incorrect results.

My subroutine is $BASICTYPE "U" and is selecting records using the lower
case select and selecting to active list #3.  It then processes from list
#3 and returns its result.  I've tried using the RTNLIST and PASSLIST
options on the EXECUTE statements and I get a "Misuse of Reserved Word
'PASSLIST'" or "Misuse of Reserved Word 'RTNLIST'".  I've tried UDTEXECUTE
with no compilation errors but also no improvement on the problem.  I've
even tried MDPERFORM but I get the misuse errors with the RTNLIST and
PASSLIST options.  Oddly enough, removing $BASICTYPE "U" I don't get an
error on MDPERFORM but I can't READNEXT from a numbered select without the
$BASICTYPE "U".

How should I structure this SUBR(..) so that it does not consume list 0
when selecting to list 3?
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users