BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Errant
Obsidian | Level 7

I'm trying to libname with a data infile statement, to avoid storing everything in work.

I tried the following code, but it didn't work. 

libname Swine 'C:\sally';run;
Data Swineflu;
Infile 'C:\sally\SwineFlu2009.dat' dsd dlm='09'x missover;
input 	First_Case_ID 
		Case_Continent_ID
		Country $
		First_Case_Date
		April_Cases
		May_Cases
		June_Cases
		July_Cases
		August_Cases
		Last_Cases_August9
		First_Death_ID
		Death_Continent_ID
		First_Death_Date
		May_Deaths
		June_Deaths
		July_Deaths
		August_Deaths
		September_Deaths
		October_Deaths
		November_Deaths
		December_Deaths
		;
proc print data=Swine.Swineflu;
 
run;

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
novinosrin
Tourmaline | Level 20

did you miss the two

level name prefix in your data statement in the data step?

libname Swine 'C:\sally';run;

 

Data swine.Swineflu;

 

View solution in original post

1 REPLY 1
novinosrin
Tourmaline | Level 20

did you miss the two

level name prefix in your data statement in the data step?

libname Swine 'C:\sally';run;

 

Data swine.Swineflu;

 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 1 reply
  • 720 views
  • 1 like
  • 2 in conversation