Comma Delimited File Parser Files

The accompanying files contain use files for parsing comma delimited files to be read into Comet. These files usually with the exetention of ".CSV" may be generated from any number of products including Microsoft Excell, etc.

It is assumed that the file to be read is registered in Comet as a text file. Either create the file with the following MTB statement:

CREATE FILE$, DIR=DIR$

before copying or generating the file into the directory, or use option 13 in the Comet Utilities to register the file in the appropriate QDIR.

There are 3 CED Source files in this package. One is a test program that shows how to use the routines, and 2 use files to be included in your source.

Basically, the program is responsible for reading the input record from the text file. Each subsequent call to the PARSE subroutine will give back the next field in the record in the variable INFIELD$. The program may call PARSE as many times as needed to get all of the fields from the record. It is assumed that the calling program knows the number of fields to expect. Once the last field has been parsed from the record, subsequent calls to parse will result in empty strings.