The data set RADIO contains data from a survey of 336 listeners. The data set contains information about listeners and their preferences in radio programming. The INFILE statement specifies the external file that contains the data. MISSOVER prevents the input pointer from going to the next record if it doesn't find values in the current line for all variables listed in the INPUT statement. Each raw-data record contains two lines of information about each listener. The INPUT statement reads only the information that this example needs. The / line control skips the first line of information in each record. The rest of the INPUT statement reads Time1-Time7 from the beginning of the second line. These variables represent the listener's radio programming preference for each of seven time periods on weekdays (see Completed Survey Form ). Listener=_N_ assigns a unique identifier to each listener.
data radio;
   infile 'input-file' missover;
   input /(Time1-Time7) ($1. +1);
   listener=_n_;
run;