1. Refer to the SOCCER dataset. Write a SAS program which creates a SAS dataset and writes each player's name and jersey number to a text file called SOCCDATA.TXT on your diskette. This text file should look like this:
Danielle Bass wears Number 11 . Erin Baxter wears Number 23 . Keisha Bell wears Number 5 . Christie Brady wears Number 8 . (etc.)
Turn in a copy of the SAS program and a printout of the file SOCCDATA.TXT. Make sure that your program reads jersey number 00 correctly.
2. Refer to the HOCKEY dataset. Write a SAS program which creates a SAS dataset and writes the date, Ohio State's score, opponent's name, and the opponent's score to a text file called HCKYDATA.TXT on your diskette. Use an appropriate format for the date. The text file should look like this:
10/10/1997: Ohio State 5 , Toronto 0 10/18/1997: Ohio State 0 , Miami 3 10/24/1997: Ohio State 2 , Merrimack 7 10/26/1997: Ohio State 5 , Merrimack 3 (etc.)
Turn in a copy of the SAS program and a printout of the file HCKYDATA.TXT.
3. Refer to the MANATEES dataset. Write a SAS program which reads and prints the dataset. Provide labels for all of the variables, and print the dataset with columns headed by those labels. Add a title and a footnote to the printout. Write at least one comment statement in your program.
4. Refer to the USEDCARS dataset. Write a SAS program which reads the dataset and prints only the following information in this order:
Use FORMAT statements to print the mileage and cost variables. Write at least one comment statement in your program.
5. Refer to the CATS2 dataset. Write a SAS program which reads the dataset and prints only the names of the cats and their GFR values at week 0, arranged in order from the smallest GFR value at week 0 to the largest. Write at least one comment statement in your program.
6. Refer to the HANKS dataset. Write a SAS program which reads the dataset and prints (in chronological order from 1984 to 1998) only the title of the movie, the year, and a simplified children's rating system, as described below:
Use FORMAT statements to print the ratings. Write at least one comment statement in your program.
7. Refer to the IRIS dataset. Write a SAS program which reads the dataset and prints only the data for the 50 observations with the largest sepal widths. Label the variables and print those labels instead of the variable names. Write at least one comment statement in your program. (You should see from the printout that setosa tends to have the largest sepal widths.)
8. Refer to the RYAN dataset. Write a SAS program which reads and prints the dataset. Now, run the same program, but insert these lines as the first two lines of the program:
options pageno=385 missing='?' skip=20 firstobs=5 obs=12; run;
Compare the two results and write an explanation of the functions performed by each of the five options. Turn in a copy of your SAS program statements, the "before" and "after" printouts, and your written explanations.
Note - To return your SAS session back to its normal options, submit the following two lines of SAS code:
options pageno=1 missing='.' skip=0 firstobs=1 obs=MAX; run;