On 28/06/12 18:30, David A. Green wrote:
> Sure,
> Let's say you have a file "B" that has a customer number in the data and not
> the key.
> And you want to build a link from file "A" that also has a customer number
> in the data.
> You would build an index on file "B" for customer number.
> Then create a generic subroutine that takes in a filename and index data
> field that returns keys.
> This program has a COMMON block that sets LAST.FILENAME and F.FILENAME open
> variable and checks to see if it needs to open the FILENAME.
> Then do a SELECTINDEX to an unused LIST and convert it to an MV list or you
> can step through the index to create a list of KEYS to return.

Better still, use the BASIC READINDEX statement. Depending on the
options, it will either return a list of all keys (values) in the index,
or a list of all keys for a given index value.

I know I wrote a generic routine some time back to do just that for a
dictionary item.

U2-Users mailing list

Reply via email to