SAS Enterprise Guide

Desktop productivity for business analysts and programmers
BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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?

Thanks.
1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi, Chris:
In looking at this site:
http://files.medi-cal.ca.gov/pubsdoco/publications/Masters-other/4010/837_v4010A1_data_specs_cg01.pd...
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:
http://support.sas.com/ctx/samples/index.jsp?sid=96&tab=about


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.
http://support.sas.com/techsup/contact/index.html

Good luck,
cynthia

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

Register now!

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 2459 views
  • 0 likes
  • 2 in conversation