BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
benkhalil_1976
Calcite | Level 5
I have I have been two weeks attempting to extract Lyme disease data from a ASC file but every time I receive error message any help please
1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
Do you have the SAS program to read the file from the provider? Is it a public file?
If so, please share the link.

View solution in original post

12 REPLIES 12
Reeza
Super User
Do you have the SAS program to read the file from the provider? Is it a public file?
If so, please share the link.
TomKari
Onyx | Level 15

You need to provide a few details. What does your file look like? When you say ASC, do you mean an ascii text file? Can you include a couple of lines of the file?

 

Tom

benkhalil_1976
Calcite | Level 5
The file is Hcup dataset the name of the file is NIS_2017_Core.ASC and located at my desktop C:\Users\benkhaal\Desktop
And there are other two files one calle NIS_2017_Sensitivity.ASC and the other one call NIS_2017_hospital.ASC. I need to extract lyme disease data such as diagnosis, treatment, cost of staying. For each state
ballardw
Super User

Provide an example of the file.
Open the file with a text editor, Copy a few lines and then paste them into a text box opened on the forum with the </> icon above the message window.

If you have any documentation about the data file then provide that information or a link to the description.

 

How are you trying to "extract data"? Use one of the tools to import the data? The tools generally are for simple well structured files. If you have a complex or non-standard file then those tools are likely going to have a problem.

 

And 'receive error message' with no details of what specific task or the actual message is not very helpful.

benkhalil_1976
Calcite | Level 5
The file is Hcup dataset the name of the file is NIS_2017_Core.ASC and located at my desktop C:\Users\benkhaal\Desktop
And there are other two files one calle NIS_2017_Sensitivity.ASC and the other one call NIS_2017_hospital.ASC. I need to extract lyme disease data such as diagnosis, treatment, cost of staying. For each state
Reeza
Super User
There should be a .sas file that comes with the ASC files that allows you to read those files into SAS.

We can't see your computer, your monitor, your code, only what you post. You will need to provide more detailed specific information for help.

The NIS data typically comes with user documentation that should have some basic instructions on how to load the data. Have you read and followed those instructions? Is something in them not working?
benkhalil_1976
Calcite | Level 5
Yes Reeza there are two files one ASC and the another is Excel
Tom
Super User Tom
Super User

There should also be a .sas program file for each .ASC text file.

 

You will probably need to made a small edit to the program file before running it to make sure that the program has the name of where you stored the ASC file. 

 

Just open the program file in your SAS editor and look for the INFILE statement.  In the programs I got they started with a PROC FORMAT step to define some format first so the DATA step that actual reads the file starts later in the file.

 

Unless they have made changes since I last loaded HCUP_NIS data files.

benkhalil_1976
Calcite | Level 5
Thank you Tom for answering. Yes I down loaded the data in the SAS file and it is ready for analysis, my question is it hudge data and I need to extract only the Lyme disease data in sime specific states
Tom
Super User Tom
Super User

For that you need to understand what variables you have and what they mean.

For example is there a variable that indicates a state? How is it coded?

Is there a variable that indicates disease? How is it coded? Is Lyme Disease actually one of the diseases in the database?

benkhalil_1976
Calcite | Level 5
The dataset is huge and it works with some abbreviations for example DX for diagnosis a n.v d there are DX1, DX2... DX40, and some codes like ICD-10 code for example Lyme disease has code A69.20..so it is sample as the normal variables
Reeza
Super User
Can you make some fake data that shows how your data is structured with the same variable names, You only need 5 or so diagnosis and show your expected output based on the input. And then we can help you write the code needed.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 12 replies
  • 2186 views
  • 1 like
  • 5 in conversation