This is a more sophisticated Open Access handler program than
the one included in the earlier example that
allows a CSV file to be read using a conventional READ op-code with no
need to use IFS APIs or to use utilities to copy the data from the CSV
form to a temporary database file. The major addition in this version
is the ability to use column headings in the CSV file to supply the
column names. In addition the sequence of the data in the CSV does not
have to match that in the physical file.
The article that explains the whole proces
can be found here
Here you can find the source files for the CSV data file (IFSDATA1) that is used in the example. The main
source file for the handler (IFSINPHND2), and
the test program from the article (IFSINPTST2).
The /Copy file used to define the IFS control (IFS_CPY2)
parameter is shown here
The /COPY file QRNOPENACC is shipped by IBM as part
of the Open Access support. The other files used are part of the CSVR4
routines referenced in the article.
|