Hi... I would test it out this way:
%let myparm = ABCD
%let mynum = 15;
create table new as
"&myparm" as requesting_college format=$4.,
&mynum as anumber,
proc print data=new;
title 'should have 2 new columns, one char and one numeric';
The bottom line is that you have to understand how macro variables work "outside" of being a parameter and then once you are dealing with parameters, you don't have any issues.
The difference in my code is that &myparm and &mynum are both assigned in the %let statement without any quotes -- this gives me the most flexibility to use them in subsequent code.
In "vanilla" PROC SQL code, IF I want to assign the constant value "ABCD" to the requesting_college variable and the number 10 to the anumber variable, then the code would be:
create table new as
"ABCD" as requesting_college format=$4.,
10 as anumber,
The quotes belong to the assignment of the character constant ABCD, so I need to have quotes around the &myparm reference (as shown in the first code example). But, the assignment for the anumber variable does NOT need quotes because I am creating a numeric constant for each row, so &mynum reference does NOT have quotes in the query code.
Essentially the SAS Macro facility is only generating code. So when the reference "&myparm" is encountered, the quotes belong to the syntax of the select statement and &myparm is passed to the macro processor to be resolved. If you put the reference to &myparm in single quotes, you will prevent the macro processor from resolving the macro reference. So you should always use double quotes where you need them.
%let parm=boys and girls, it is Howdy Doody time.;
A neat debugging trick is to use the %put to write macro variables out to the SAS log. If you run this little snippet of code in a code node window, you should see that the macro variable reference in the single quotes was NOT resolved, but the macro variable reference in double quotes was resolved.