/* Various options for PROC PRINT */ /* Printing the scores data set */ data scores; *infile 'z:\My Documents\teaching\stat_517\sasdata_scores.txt'; FILENAME webpage URL 'http://people.stat.sc.edu/hitchcock/sasdata_scores.txt'; INFILE webpage; INPUT gamedate MMDDYY10. +1 VisitingTeam $20. +8 vscore 2.0 +2 HomeTeam $20. +8 hscore 2.0 Note $CHAR16. Bet COMMA10. +5 gametime TIME8.; LABEL gamedate = 'Date the game was played' VisitingTeam = 'Name of the Visiting Team' vscore = 'Score for the Visiting Team' HomeTeam = 'Name of the Home Team' hscore = 'Score for the Home Team' Note = 'Interesting Fact about the Game' Bet = 'Amount of Money wagered on the game' gametime = 'Time of day the game began'; RUN; /* First sorting the data by gamedate */ /* as preparation for the BY option in PROC PRINT */ PROC SORT data = scores; BY gamedate; run; PROC PRINT data = scores NOOBS LABEL; FORMAT gamedate WEEKDATE17. Bet DOLLAR13.2; BY gamedate; SUM vscore hscore; VAR gamedate VisitingTeam vscore HomeTeam hscore Bet; title 'A Listing of the Football Scores Separated by Date'; run;