BookmarkSubscribeRSS Feed
teamari
Calcite | Level 5

Hello, 

 

I have a .txt file and a SAS syntax to read in the .txt file so my guess is the two files need to be read together in SAS Studio. Unfortunately, I do not know how to use the software and was wondering whether tou could help me find out how to combine the two files, as the .txt contains the observations, whereas the .sas control file only contains the variables. 

Attached is the beginning o fthe SAS control file, which asks to write the location of the .txt file, but i do not know how to proceed. 

 

Thank you for your help!

 

 

2 REPLIES 2
Reeza
Super User
I would highly, highly recommend taking the free SAS programming one course. I'm assuming you're using SAS University Edition, that you downloaded and are running on your own machine. If you're using SAS Academics on Demand or a company installation the instructions are different. In fact the primary difference between these systems, is how you reference files.

But in the meantime here's what you need to do.

1. Plae the file you imported into the my folders folder you created on your computer.
2. Go into SAS UE
3. Click on Servers Files and Folders Pane
4. Navigate to the file you just put in the folder (best to keep the name all lower case)
5. Right click the file and select properties
6. Copy the path

7. Insert that path into your .SAS program as needed and run it.


A .sas file is a text file with SAS programs in it. In this case it's a program to import the text file, so after you run the code you should end up with a data set in your work library.

In the future please don't post screenshots as attachments, you can include them directly into the forum as a post. And take the few seconds to make it presentable, ie rotate to correct orientation and such.

And the less you tell us the less we can help you. Another good resource for learning is the SAS videos.
Here's a direct link (you'll need to scroll down past the top banners and stuff)
https://video.sas.com/category/videos/sas-analytics-u

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!
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 742 views
  • 1 like
  • 3 in conversation