ST590G -- FALL 2012 Class Exercise #6 -- Tuesday, 23 October 2012 Our Group ___________________________________________________ From time to time, I may have to read some dates that are written as October 23, 2012 where I really want the month number so that I can make a SAS date. I can use our character manipulation tools to pull out the pieces, but the month is a problem. 1) Write the code to create a SAS format that takes the name of a month and produces the (character) month number. For example, take the character string 'October' and produce the character string '10' (so it's a character-character format). Do this WITHOUT writing or reading a file. (Hint: The format monname. gives the month name.) Recall back in September, when we were first learning about character functions, the file 'fball.dates' had dates with the day of the week smushed together with the month (name), day, and year. We wrote code (see sep12.ex2) to pull those apart and wrote some clunky code to convert the month name to a number with 'IF' statements. 2) Read the dates from 'fball.dates' and parse out the month name and use your format in (1) to get the month number and a SAS date. 3) Check to see if the day of the week given in the file is correct. (Hint: downame.) Submit your output and log. Don't forget your toes!