Well, the problem with your methodology would be what default to apply. Numbers could be anything from 16 to 1, include signs and decimals. Characters can contain anything and be up to 2000 long, and dates can come in any number of formats (and could be char or number). So the quesiton is how are you going to standardise all this? What are your rules? What are the error capture necessities etc. Techinically it is possible to generate the necessary program, however you need to have all your rules in place and for them to cover every eventuality.
A more pertinent question is why do you not know what your data is like? Why the need to change formats and such like after the event, sounds like something earlier in the process is not working, maybe your importing from Excel (as Excel is a poor data medium) and using proc import (a guessing procedure, multiplies the issues you will have with Excel). So a solution there would be to use a robust data medium (CSV, XML etc.) and write a datastep import program to specifically import the data into the model you need.
... View more