The SAS code file M2.sas has the questions 1,2,3,4 while the rest are in this guidance file. Follow the code in the .sas file step by step and answer the questions. Use this as a template for later questions as well.
Put your answers of each question as a comment in the code.
Append your code to the end of this word file and submit.
If you need to do screenshots of your result, you can submit them in the same word file with other answers.
Q1-3 (15 pts each): in the SAS file “M2.sas”.
Q4 (10 pts): in the SAS file “M2.sas”.
Q5. (45 pts) Download the data files m2_d1 – m2_d6 to your computer. Use a text viewer, such as Notepad, to check them.
5.1 Slide 21-35 of lecture M2 introduced 4 most popular INPUT styles using a data step. Which one to use depends on the features of the data in the flat file. Fill in the table below to answer the questions for each data file.
File Name Column aligned or delimited? Are the character variables
standard? Are the numeric variables
standard? Any missing value in the last variable? What’s the best INPUT style to use?
M2_d1
M2_d2
M2_d3
M2_d4
M2_d5
M2_d6
5.2 For each data file, write an appropriate DATA step to read it in, and then save to a permanent library. You should have created a library m2 for this module.