Challenge! Reading Mainframe Hex Delimited Flat File Where Each Line Has Different Layout
Source: SAS Institute
This paper illustrates how to design an appropriate input program to handle a complex file layout using data collected from pharmacy and health insurance information about individuals. Various INFILE and INPUT options are illustrated in the process, and some related functions are considered. The input file is the output of a COBOL program pulling data from a DB2 database which is then brought to the PC via FTP. Each record contains 6 types of information, called segments, for a person. The segments and the fields within are divided by unprintable hexadecimal codes, which SAS represents with notations like the hexadecimal numbers 1E (Segment separator) and 1C (Field separator) respectively.