Guest.Visitor
David, I have been using these since my System/34 days. Having started in a card shop, I can see how they related at the time. I can also see now, how their use has been diminished, but the concept is still very useful. I recently used two table files in a data load program. One table file was used to validate a state code. Rather than doing a SETLL with %equal to see if a valid state code was in a control file, I just did a lookup on the table file that was loaded into memory from the same datafile I would have used to verify the state code. I also used another table file in the same program to hold my error message file. This file had all the error messages I used in the program, a corresponding message number, and a code to identify if the error was a Reject Type of message, or just a Warning message. Since this program needed to do alot of I/O anyway, I used this technique to cut down on the I/O since these two tables did not change in size very often. Thanks for the great \'reminder\' article! Doug Englander
David Abramowitz
You\'re welcome Doug. Always nice to receive a kind word. Dave
Guest.Visitor
You do not have to know the number of records in the table file if you are using the equal to lokup only - Just have to create the Table greater than the possible records - rest of table and just null. With the advent of Index Files the whole table file became obsolete because you can always chain. It was needed before Index Files.
David Abramowitz
[i>William Carey wrote: With the advent of Index Files the whole table file became obsolete because you can always chain[/i> I believe that this misses the point of the article:
    [*>With Table files you can define on the fly what your "index" will be. [*>With table files, there is only a single I/O at the beginning of the program.[/list> The performance increase when using a table file is nothing short of fantastic. Try 1,000,000 random accesses verses 1,000,000 lookups. I was quite careful to note the drawbacks of using this technique, and the reasons not to use it. OTOH a good mechanic has a complete set of tools. Even those that are not used too often, are still carried - - - - just in case. Dave
David Abramowitz
"I" specs should not have been used under ILE or RPG IV. Anyone trying this technique should use "D" specs to define a data structure containing sub-fields. Dave
Please login to make comments.
User Rating: / 0
PoorBest 

WHITE PAPERS

The following White Papers can be found at the MC White Paper Center

 

 


   MC-STORE.COM