Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 20 NOV 1998 04:06:10PM Victor Engel wrote:

Anyone have a utility to form an intersection or union between two or more saved lists? How about one that works sort of like FORMLIST but using and active list instead of an individual record, i.e., the process gathers values from a field for all records in an active list and uses them as keys for the new active list.

An example of where this would be helpful is if you have two files, one of which has a multipart key, one of whose parts forms the key of the other file. Using such a utility, one select list could be used for either file.


At 23 NOV 1998 01:02PM Jim Jefferson wrote:

Victor:

I've wrote a program called MERGELIST that creates, from two savedlists, another savedlist that contains the difference, union, or intersection of the first two lists. Leave your email address and I'll send you the source.

I'm working on another that will do the second thing you wanted, to work like the Universe SAVING and SAVING UNIQUE keywords. Will send that along when done.

Jim Jefferson

jbj@jclinc.com


At 23 NOV 1998 04:36PM Jim Jefferson wrote:

Oops! I've "written"…

Sorry!


At 23 NOV 1998 04:47PM akaplan@sprezzatura.com - [url=http://www.sprezzatura.com]Sprezzatura, Inc.[/url] wrote:

There's a program on DUDS 5 called FSELECT which returns a field value as the active list.

FSELECT FROM INVOICES SETTING CUST_CODE WHERE AMOUNT_PAST_DUE GT "10000.00"

will return an active list of customer codes you can use to send a deadbeat letter.

akaplan@sprezzatura.com

Sprezzatura, Inc.

www.sprezzatura.com_zz.jpg


At 23 NOV 1998 05:21PM Victor Engel wrote:

victor_engel@dell.com


At 24 NOV 1998 02:52PM Warren wrote:

A useful little utility. This was a built in feature of Prime Information (no doubt exists in UniVerse and UniData). Syntax was/is:

select invoices saving cust_id with total_due gt '1000.00'

adding the 'unique' keyword would eliminate duplicate cust_ids from the select list.

One of the many enhancements I requested years ago (and was ignored). Another is the 'require_select' keyword for list or sort. Ever have a program or process do a select followed by list when there were no hits in the select then have the list run against the entire file? Granted there are work-arounds but built-in solutions are more elegant.


At 24 NOV 1998 04:04PM Victor Engel wrote:

I have a very simple solution. Catalog this program as IF_ANY_THEN

@tcl.stack=delete(@tcl.stack,1,0,0)

sentence=trimf(@sentence)

command=trimf(field(sentence,' ',2,999))

if @list.active then perform command

Now in your batch lists, you can include stuff like this:

SELECT datafile ….

IF_ANY_THEN LIST datafile …. (or whatever)


At 26 NOV 1998 10:33AM akaplan@sprezzatura.com - [url=http://www.sprezzatura.com]Sprezzatura, Inc.[/url] wrote:

On the program, it was written to try and emulate that very procedure. If I had thought about it, I might have embedded it into 3.12, but no major features in the product was a prime motivator.

We used to debate how to handle the no hits so work on the entire file. We finally decided that since this was going on for so long, that it became and accepted feature. We toyed with the idea of adding a keyword, but in a situation where it's

SELECT FILE WITH CONDITION AND CONDITION

LIST FILE FIELD1 FIELD2

and nothing happens, what would be the result? The lists needs to work off either the file or an active list. I suppose we could create an active list with a null key, but that would still be a list, so the No Records Processed message wouldn't show up.

Somone offered the idea of checking for that, but when we did, we found it couldn't find the occastional null key that ends in the file.

Not an answer, just a history of discussions from the lab.

akaplan@sprezzatura.com

Sprezzatura, Inc.

www.sprezzatura.com_zz.jpg


At 28 NOV 1998 08:24PM Victor Engel wrote:

I would have liked having an active list with no records. Why would you have to have the null record? My thought would be to use @list.active to test whether a list was active and @rec.count to determine if any records were, in fact, selected. Also, a readnext would execute the ELSE statement on an active list with no records. Everything would seem to work fine this way.


At 11 DEC 1998 01:02PM apk@sprezzatura.com - [url=http://www.sprezzatura.com]Sprezzatura, Inc.[/url] wrote:

How would you handle this if you had a latent select going?

Just asking. No real need to carry this on, since it's a moot point…

apk@sprezzatura.com

Sprezzatura, Inc.

www.sprezzatura.com_zz.jpg


At 11 DEC 1998 02:29PM Victor Engel wrote:

Well, with a latent list, you know you are going to get to your READNEXT logic anyway, since that's what resolves the list, so you could take care of the problem in the READNEXT logic:

READNEXT ID THEN

 IF THEN we know we found a null record

END ELSE

 No more rows, as opposed to a null record found

END

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/ee4a3cf94c7d2acd852566c20073ebd4.txt
  • Last modified: 2024/01/04 21:00
  • by 127.0.0.1