Desktop productivity for business analysts and programmers

SAS parsing program for claims submissions data (837 layout)

Posts: 0

SAS parsing program for claims submissions data (837 layout)

Hello - I am coding (from scratch) a parsing program that will extract health care claims data from the ANSI ASC X12N 837 Health Care Claims (837) transaction layout. Due to the program complexity, I've been searching for a sample SAS program that has done this before - but haven't found one yet. Does anyone have any suggestions about where I could locate such a program?

Posts: 8,720

Re: SAS parsing program for claims submissions data (837 layout)

Hi, Chris:
In looking at this site:
it seems to me that your data might fall into a complicated format, where you have to read a record identifier and then write a separate INPUT statement for each different kind of record.

The PDF that describes your record layout does say that it is a hierarchical file and refers to the possible repetition of records as "LOOPS". It is possible to read a hierarchical file with SAS. However, to do it will involve an advanced use of the INPUT statement and possibly include the use of the trailing @ sign to hold each record for further parsing after you make the decision (with an IF statement) about what the record format is. You may also need to use the RETAIN statement to retain or keep information from different records in the hierarchy, because information found on a higher level record is not repeated on a lower level record (according to the PDF).

Tech Support DOES have a sample of reading a simple hierarchical file. Their program creates a little sample file with a few record types as step 1 and then their Step 2 program parses the hierarchical file. The URL for the sample program is here:

If you still feel that you need help with the syntax, after reviewing the sample, your best bet with this kind of problem is to contact Tech Support. It will be easier for them to help you with the program if you can provide a sample of what the data -actually- looks like. Here's the link with the ways to contact Tech Support.

Good luck,
Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation