Problem:
How can I preserve horizontal tabs in my input to process a tab delimited file?
Resolution:
Use the RUN-SEQ-FILES configuration record. (See chapter 10 of the RM/COBOL User's Guide.) In particular, set TAB-STOPS=0. In this way, horizontal tabs are passed through to the COBOL program without expanding them into spaces.
The attached program demonstrates this, as well as:
- how to be informed of the input record length
- how to symbolically define the horizontal tab character
- how to unstring the record, and
- how to convert numeric strings to numbers
Unzip the attached file. Compile the COBOL program, and run it using the config.cfg file as the configuration file.