SASUSER.ADMIN is unlikely to exist. You may need to share the actual content of that data set as well.
Or use a set that should be available to most such as SASHELP.CLASS;
Proc sql; Select distinct sex into:act separated by "@" from sashelp.class; quit; %let n=&sqlobs; %put ***&act.*** ***&n.***;
SAS creates an automatic variable named SQLOBS that contains the number of results returned from the most recent Proc SQL query. So no actual need to do the extra Select count.
Hello @Ahmej Welcome to SAS communities. Can you please post your code that creates those macro variables and the log. Thank you
This statement is incomplete. If you would like it to execute, add a semicolon at the end of it:
%put ***&act*** ***&n***;
And now please post the complete log, using the window displayed when clicking on the {i} button - that way the format is maintained and the log stays readable.
SASUSER.ADMIN is unlikely to exist. You may need to share the actual content of that data set as well.
Or use a set that should be available to most such as SASHELP.CLASS;
Proc sql; Select distinct sex into:act separated by "@" from sashelp.class; quit; %let n=&sqlobs; %put ***&act.*** ***&n.***;
SAS creates an automatic variable named SQLOBS that contains the number of results returned from the most recent Proc SQL query. So no actual need to do the extra Select count.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.