Assignments for Lesson 2

 

Please first transfer the data set into a diskette for the use of this class. (If you feel that it is easier for you to fetch data directly from my file in the future, then you need only to transfer one data set to a diskette to make sure that you know how to read data from a diskette.) Remember that your programs must read the data values from the text files exactly as they appear. You may not edit the text files to make them more convenient for SAS.

1. Refer to the CATS1 dataset. Write a SAS program to read the data file from your diskette with an INFILE statement and print the dataset. There should be eight observations and two variables.

2. Refer to the DOGS1 dataset. Write a SAS program to read the data file from your diskette with an INFILE statement and print the dataset. There should be 25 observations and six variables.

3. Refer to the BREAD dataset. Write a SAS program to read the data file from your diskette with an INFILE statement and print the dataset. There should be 11 observations and 11 variables.

4. Refer to the GRADES dataset. Write a SAS program which uses a DATALINES command, not an INFILE statement, to create and print the dataset. Copy and paste the numbers from the text file into your SAS program. There should be 23 observations and 14 variables.

5. Refer to the SOCCER dataset. Write a SAS program to read the data file from your diskette with an INFILE statement and print the dataset. Read the feet and inches in the heights of the players as two separate variables. There should be 32 observations and eight variables. Make sure that your program correctly interprets Lynn Pattishall's jersey number as 00.

6. Refer to the CATS3 dataset. Write a SAS program to read the data file from your diskette with an INFILE statement, write a permanent SAS dataset onto your diskette, and print the dataset. There should be eight observations and five variables.

7. Refer to the MANATEES dataset. Write a SAS program to read the data file from your diskette with an INFILE statement and print the dataset. There should be 23 observations and seven variables.

8. Refer to the DOGS2 dataset. Write a SAS program to read the data file from your diskette with an INFILE statement, write a permanent SAS dataset onto your diskette, and print the dataset. There should be 25 observations and four variables.


Return to STA 5106 home page