07-02-2017 08:02 AM
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.
07-02-2017 09:11 AM
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
07-02-2017 09:14 AM
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.