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-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
  • 4 replies
  • 467 views
  • 2 likes
  • 3 in conversation