BookmarkSubscribeRSS Feed
dhir
Obsidian | Level 7

Hi,

 

Please find attached, I want to import 10-12 dataset in SAS Project with same variable formats and then append (add all obs) to create 1 single large dataset. 

 

Each time I import a file I have to define field attributes, can these be converted into a sort of template & applied which importing a new file. 

 

Am using SAS EG 6.1 (64bit) 

 

Thanks in Advance. 


Format type.png
4 REPLIES 4
Cynthia_sas
SAS Super FREQ

Hi:

  If you want to continue to use point and click techniques, then there's not a lot of options when you are doing point and click, although you can copy tasks and make task templates, so those might be alternate ways to avoid having to do the format definition over and over.

 

  However, if you are willing to learn how to write programming code, then you would learn in the Programming 1 (free as e-learning) class how to write a program to import data into SAS. Once you have a program to read one dataset working correctly, then you only need to modify the program to read the other datasets. There are even ways to automate this process using the SAS Macro facility. However, depending on how you need to work and what you're willing to learn, impacts the answer to your question.

 

  SAS Programming 1 can be activated by going here and clicking START on the self-paced e-learnining offering of the class: https://support.sas.com/edu/schedules.html?ctry=us&crs=PROG1

 

cynthia

dhir
Obsidian | Level 7

Thank you, Cynthia.

Tom
Super User Tom
Super User

Note: If you want to attach a picture in this forum use the insert image icon instead of attaching it as a file. That way it is visible in the message.

 

If you want to control the format of the data set generate from a text file then use a program to read the file instead of using PROC IMPORT.  Proc Import has to guess at what the files contain.

dhir
Obsidian | Level 7

Thank you, Tom.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 4 replies
  • 745 views
  • 2 likes
  • 3 in conversation