Hello All,
This is my first post and i am new in Sas programming.I just started reading Sas a week ago for my class and i am confused with so many ways we can read raw data.My question is how to know which input method to use for read a raw data.How do we know when to use list input, column input or formatted input. Is there a particular way to figure it out or its just more practice.
Thanks in advance
Thank you for your suggestion. I will definately look into that free learning course.
The key thing is how is the file you are reading formatted.
If it is delimited, like a CSV file, then list mode input is best, use the DSD option on the INFILE statement. You can even try using PROC IMPORT to make guess at what your variables are and how they should be defined.
If it is fixed format then read it using either formats or column positions.
If it is space delimited then you can sometimes use list mode, but you need to make sure that missing values are properly indicated or else the input will read the values out of order because it cant' tell that the extra spaces mean there is empty value.
Thank you Tom. It gave me better idea on how to read raw data files.
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.
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.