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 17 JUL 1998 05:29:01PM Stacey E Haws ([email protected]) wrote:

How do I create a list from within an R/basic program. What I want to do is

1. open the lists table

2. read my list

3. check to make sure the key I want to add is not already there

4. put the key in the list if it does not already exist

5. write the list back out to the lists table.

I'm pretty sure I can do every thing but #4.

I have a program that does a similar thing but it puts the keys into a multi-valued field with the statement

agent_rec=key

where agent_rec is a record read from a table. My problem is when I edit the agent table field 45 is a multi-valued field with each of the keys separated with a ² (@vm), but when I edit a list from the lists file the keys seem to be on a line each by itself. I need help.

Thanks.


At 17 JUL 1998 06:49PM Jeff Blinn wrote:

Can you guarantee the size of the 'lists' you want to check/add to?

The reason I ask is that when you generate a select list, each record is limited in size to 64K, so if the list ends up being bigger than that, the system actually splits the list up into multiple parts (listname, listname*2, listname*3, etc.) - as many as it needs. This would involve some more processing by your program, but you could write a routine to keep going through multiple lists until you exhaust them all.

However, if you're sure the lists are small enough to be contained in one record only, you can:

- open the lists file

- read the record you want

- check if the key your looking for exists (LOCATE would work for this)

- if you just want to tack the new key to the end of the list, you can use something like agent_rec=whatever, or the INSERT command. You could also get a position from the LOCATE statement if the records are sorted by the record keys in conjunction with the INSERT command.

Jeff


At 17 JUL 1998 10:39PM Stacey Haws ([email protected]) wrote:

Thank you very much, I thought it would be something simple like that. Thank you also for bringing up the size factor. The list I am looking to create will be well within this size limitation but I had forgot about it.

As a follow up to you comment on the 64K limit, we have had some problems that I think might have something to do with that. Specifically, we have had 2 problems:

1. We were doing a select with multiple criteria that we split up into multiple select statements. After each select we saved the list. After the last select it reported that a certain number of records had been selected and we saved that list and then got the list and did a list statement, however, the number of records that were listed differed from the number that were selected. The number that Arev reported that had been selected and the number that Arev reported had been retreaved in the getlist were the same but the number that listed out in the list statement were different, the latter being smaller. We rearranged the order of the select statements and didn't have the problem any more. I don't have the exact information and can't remember exactly what we were doing but this was very troubling and promped us to look into converting to OI. If anyone has possible reasons for this I would appreciate any help.

2. We create a select and save a list. Then getlist and list the table sorted and totalled by a particular field. We then getlist and list sorted and totalled by another field (a very long (25-35 chars) field). I am considered magical because two others have tried this and when they do it the second list report does not have all of the records but when I do it all of the records show up on the sencond report. Any help on this one?


At 18 JUL 1998 12:38PM Jeff Blinn wrote:

A couple guesses here . . .

We were doing a select with multiple criteria that we split up into multiple select statements. After each select we saved the list. After the last select it reported that a certain number of records had been selected and we saved that list and then got the list and did a list statement, however, the number of records that were listed differed from the number that were selected.

The thing that jumps to mind in this case would be corrupted indexes. If the select statement selects records based on an indexed field, it is possible that if some records have been deleted, but the index doesn't relect that correctly - you would end up with less records being 'listed'. If you try to list records that don't exist, there is no error message - they just don't show up.

I am considered magical because two others have tried this and when they do it the second list report does not have all of the records but when I do it all of the records show up on the sencond report. Any help on this one?

Are you running the report on a different workstation? If so, do you have more available memory?

Jeff


At 20 JUL 1998 01:15PM DSig (SigSolutions) wrote:

Stacey,

I have emailed you a routine which you might find handly. It allows you to programatically Check that an id is in a list group and optionally add the id to the group.

If you have any problems with it let me know ..

DSig

David Tod Sigafoos ~ SigSolutions

[email protected]


At 23 JUL 1998 03:47AM Curt Putnam wrote:

If any of the select criteria involved multi-valued fields, you might well get count variations

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/8fc0cfce28606b1385256644007603a2.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1