>David,
>
>I don't think that a Data Dictionary would help here - You can add all the fields you want on the table side without a problem, but the input side is NOT going to be in the data dictionary no matter what.
>
>In other words, data dictionaries do not solve all problems.
>Cheers,
>Jim N
Not necessarily *all* but it will kill most needs for hard-coding this kind of work.
Consider that the INSERT statement could be built completely on the fly, based on a dictionary:
* return value indicates that the string build worked...
lcFields = ""
lcValues = ""
IF BuildInsertStrings(@lcFields, @lcValues)
DO WHILE !end_of_file && I'm skipping the basic reading and eof logic
INSERT INTO MyTable (&lcFields) VALUES(&lcValues)
ENDDO
ENDIF
The speed of this routine is determined by a number of factors, but by using the dictionary, the system can be easily adjusted for the fields in the source data file, generally without programmer intervension, and with rare exception without recompiling.