* Simple MISSOVER example; data tests; INFILE CARDS MISSOVER; input student :$11. test1 test2 test3; cards; Smith 67 78 59 Ehrmentraut 87 45 Johnson 47 ; run; proc print data=tests; run; * Simple TRUNCOVER example; data address; INFILE CARDS TRUNCOVER; input student $ 1-11 address $ 12-38; cards; Smith 123 Fake St. Ehrmentraut 1013 Albuquerque Boulevard Johnson 47 Tress Way ; run; proc print data=address; run; * Read in the simplescores data set; * arranged in columns; * Uses various INFILE optins; data siscopt; *infile 'z:\My Documents\teaching\stat_517\sasdata_simpscores_options.txt' firstobs=6 obs=29 missover truncover; FILENAME webpage URL 'http://people.stat.sc.edu/hitchcock/sasdata_simpscores_options.txt'; INFILE webpage firstobs=6 obs=29 missover truncover; INPUT VisitingTeam $ 1-27 vscore 28-30 HomeTeam $ 31-59 hscore 60-62 Note $ 63-83 Ticket; RUN; PROC PRINT DATA = siscopt; title 'Football Scores'; RUN; /* Column markers 12345678901234567890123456789012345678901234567890123456789012345678901234567890 ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8 */ /**********************************************************************************************/ /** Reading data using the INFILE CARDS type of statement **/ /* This is useful for those of you using the SAS OnDemand Enterprise Guide or SAS Studio */ data siscopt; INFILE CARDS firstobs=6 obs=29 missover truncover; INPUT VisitingTeam $ 1-27 vscore 28-30 HomeTeam $ 31-59 hscore 60-62 Note $ 63-83 Ticket; CARDS; These are various college football scores from early in the 2004 season. The first column is the visiting team, the second the visitor's score, then the home team and their score. The fifth column is a note about the game and the sixth is how much a ticket cost. Indiana State 0 Miami (Ohio) 49 Southern California 24 Virginia Tech 13 @ Landover, MD Boston College 19 Ball State 11 Buffalo 34 Eastern Michigan 37 Northwestern 45 Texas Christian 48 Tennessee-Martin 0 Western Michigan Texas A&M 21 Utah 41 Texas-El Paso 9 Arizona State 41 Washington State 21 New Mexico 17 Akron 10 Penn State 48 49 Appalachian State 7 Wyoming 53 Arkansas State 20 Missouri 52 Baylor 14 Alabama-Birmingham 56 Bowling Green State 24 Oklahoma 40 California 56 Air Force 14 Central Florida 6 Wisconsin 34 Central Michigan 10 Indiana 41 15 Cincinnati 6 Ohio State 27 Colorado State 24 Colorado 27 Duke 12 Navy 27 East Carolina 23 West Virginia 56 Florida A&M 13 Illinois 52 Florida Atlantic 35 Hawaii 28 Georgia Southern 28 Georgia 48 U. South Carolina Gamecocks729 Tennessee 0 Is that really true? I think that last score is a lie so I am not going to include it in my data set ; RUN; /* That entire data set is copied exactly as is from the external text file on the course web page */ PROC PRINT DATA = siscopt; title 'Football Scores'; RUN;