variable lookups possible?
Jeff Harrison
jeffaharrison at yahoo.com
Wed Jul 21 07:13:11 PDT 2004
--- John Esak <john at valar.com> wrote:
> > lookup generic=SOMEVARIABLE i=ANOTHERVAR ...
> > <snip>
> > --------------------------------------------
> > The lookup file name and qualifier can be
> variable,
> > but not the index - at least not without creating
> a
> > processing table that creates another processing
> > table.
> >
> > However, about a year ago I wrote a generic,
> callable
> > processing table that one could call after setting
> > three variables (lookup file, qualifier, and
> index).
> > The call table then automatically built the
> browse.
> > Here is a snippet of that code.
> >
> > :jhbidx eq "A":lookup blk =
> (jhbfile{"@"{jhbqual{"")
> > k=ky i=A -ng b=(brwfmt):
> > :jhbidx eq "B":lookup blk =
> (jhbfile{"@"{jhbqual{"")
> > k=ky i=B -ng b=(brwfmt):
>
> Jeff,
> Why does this sort of thing have to be done in a
> CALL that builds
> processing, etc. (At least that sounds like what you
> are saying...) I do
> this exact same code all the time inside a regular
> processing tabel, no
> CALL, no building of another table, etc. Set an
> index_variable, run that
> version of the lookup, exactly as you have shown it
> here. It is a bit
> cumbersome, agreed, but until the index becomes an
> expression (if ever, but
> seems like no big deal and something that would be
> useful in a future
> release). What is so hard about writing the code in
> this way? Agreed, it
> would take the 36 lines to do.
>
> John
>
Sorry, I guess I was not clear. My generic lookup
processing does not build another processing table.
What I should have said was that there are two ways to
do this that I can think of. #1 The cumbersome way
that you describe is what I am doing in the call
table. #2 is to build processing that builds
processing.
Of course, as you are aware, the beauty of making this
a call table is that I only need to write the
cumbersome code once, and I can use it in a limitless
number of situations.
Also, don't forget that you saw only a snippet. There
is other code that builds the browse format, and
handles the left-right scrolling.
Jeff Harrison
jeffaharrison at yahoo.com
Author of JHExport and JHImport. The fastest and
easiest way to generate code for filepro exports and
imports.
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail
More information about the Filepro-list
mailing list