The LOOKUP Command

 

Definition of a Lookup

 

To set up a lookup operation, there are always two, usually three activities:

 

Writing the LOOKUP statement, you specify:

 

1. The file to be connected and the record(s) from which data will be taken

 

2. Handle failure, tell the program what to do if the lookup fails.

 

3. Using the looked-up data, usually field assignments you specify the fields from which data will be read and the fields to which the data will be written.

 

Terms:

 

Current file , the file in which you're writing the lookup

 

Lookup file , the file you are looking into.