BookmarkSubscribeRSS Feed
harveysarah0
Calcite | Level 5

I am trying to import this data set into SAS and keep getting this message. I copy and pasted the data into the editor and highlighted it and clicked the little running man up top.

 

City State Price

Baltimore MD 10.95
Brooklyn NY 12.99
Buffalo NY 11.50
Harlem NY 12.50
Newark NJ 11.50
Rochester NY 10.95
Stamford CT 11.50
Syracuse NY 10.95
Troy NY 11.50

 

9 REPLIES 9
novinosrin
Tourmaline | Level 20

Hi @harveysarah0  Welcome to SAS communities. Where is your code?

 


data have;
input City :$15. State :$2. Price;
cards;
Baltimore MD 10.95
Brooklyn NY 12.99
Buffalo NY 11.50
Harlem NY 12.50
Newark NJ 11.50
Rochester NY 10.95
Stamford CT 11.50
Syracuse NY 10.95
Troy NY 11.50
;
proc print noobs;run;
harveysarah0
Calcite | Level 5

Hi there,

 

Again I am very new to using SAS and don't know a whole lot about the program. To make it a data set do I have to use the code you just provided?

novinosrin
Tourmaline | Level 20

Ah Okay, I was scratching my head to understand your Error. Oh well, how embarrassing for me. Yes, you can use the code I provided to read in your raw data values instream to create a dataset named HAVE with those values.

 

To print i.e to view the dataset, you can use the proc print code that follows the creation code. 

harveysarah0
Calcite | Level 5

Thanks so much again. Why do the city and state have those $ values next to them?

novinosrin
Tourmaline | Level 20

You need some training/learning help. Calling/Requesting @Reeza  to help new learners to provide some guidance/directions just like what I received a few years ago. 

Also @AnnaBrown  has a list of youtube videos tutorials. Let's see if they chime in. 

 

Nonetheless, If you have O'Reily media Safari library membership, you can learn from the very basic to any imagination. 

 

All the Best!

AnnaBrown
Community Manager

Thanks for looping me in here, @novinosrin!

 

@harveysarah0, I don't believe there's a specific YouTube video that will solve your problem (though it's possible How to import CSV files into SAS could help), but do subscribe to the SAS Users YouTube channel where SAS tips and tricks are posted each Monday. In particular, the SAS How to Tutorial playlist may interest you for task-oriented instruction that you can learn from.

 

Best,

Anna

PaigeMiller
Diamond | Level 26

What code did you use that produced the error message "Error 188-322 Statement is not valid or it is not used in proper order."?

--
Paige Miller
harveysarah0
Calcite | Level 5

I did not use any code but instead just copy and pasted the data given by my professor. How do I make this a data set? Thanks.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 9 replies
  • 750 views
  • 0 likes
  • 5 in conversation