-v processing
Nancy Palmquist
nlp at vss3.com
Fri Jun 12 12:17:13 PDT 2009
Dennis Malen wrote:
> Using Nancy's suggestion concerning the use of the automated index I have
> found the following:
> When I use:
> ~ If: ww="" and 3 lt dt
> Then: lookup - k=dt i=B -ng
> ------ - - - - - -
> ~ If: 3 ge dt and 3 le dy '
> Then: select
> ------ - - - - - -
> I get an additional record that does not meet my criteria. It is the first
> record that filepro sees that it seems to accept.
>
> In order to fix the problem I reversed the process and used:
> ~ If: 3 ge dt and 3 le dy '
> Then: select
> ------ - - - - - -
> ~ If: ww="" and 3 lt dt
> Then: lookup - k=dt i=B -ng
> ------ - - - - - -
> This fixed the problem.
> I am on 5.0.
>
> ANOTHER POINT:
>
> I did not have to put the -In on the menu line in order for the index to
> work.
>
> Dennis Malen
> 516.479.5912
>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
> .
>
>
Dennis,
I saw your comment and thought maybe you just got lucky but you may want
to review this information.
The point of the lookup dash (-) is to move you to another record.
So if you picture the file as a list of letters like the alphabet and
you start at record A,
you do a lookup - k="M" i=a -nx
What you are doing is moving to record M. Now that does not identify
direction when you select that record and issue an END command. What
insures that you move to the N record is the fact that you used index A
which is built alphabetical when you ran the report.
Without doing the -iA on the menu line, what you get is the next record
in the file, which may or may not be >M. If it is not, you will need to
do a lookup - to get to M, which kind of puts you in an infinite loop.
Now if you do not move alphabetically by design so you can jump to the
beginning of the group and then watch to see when you pass the end of
the group, you are jumping all over the file with no end in site.
Remember you can have more than one M entry so you can not get to the
second M using lookup - you have to let the normal movement from record
to record happen to get all the records you need.
Also you need to issue the SELECT command when you are sitting on a
record that matches your criteria and not on the other records, that you
need to see at the beginning and end of the file.
Nancy
--
Nancy Palmquist MOS & filePro Training Available
Virtual Software Systems Web Based Training and Consulting
PHONE: (412) 835-9417 Web site: http://www.vss3.com
More information about the Filepro-list
mailing list