The word FORMAT in SAS has a specific meaning. A SAS FORMAT is instructions for how to display values as text. There are numeric formats that are used with numeric values and character formats that work with character values.
To go from text strings to values you use an INFORMAT. A numeric informat will convert strings into numeric values and character informats convert strings into other strings.
So if you want convert string "20130101" into a number you can use the normal numeric informat and you will get the value 20,130,101. You have that value displayed as the string "20130101" by using the 8. format.
Now SAS stores dates as the number of days since 1960. So if you want to interpret the string "20130101" as meaning the first day of the year 2013 then use the YYMMDD8. informat. That will generate a value of 19,359. If you want to display that in a way that a human will recognize then use any of the valid date formats. For example you could use the DATE9. format to have it displayed as "01JAN2013" or the YYMMDD10. format to have it displayed as "2013-01-01". To have it display like the original string use the YYMMDDN8. format.
210 data test;
211 string='20130101';
212 number=input(string,32.);
213 date=input(string,yymmdd10.);
214 format date yymmddn8.;
215 put (_all_) (=);
216 run;
string=20130101 number=20130101 date=20130101
NOTE: The data set WORK.TEST has 1 observations and 3 variables.