I hear this a lot from people and I've said it a few times myself and find myself saying it today, "I written SAS code like this a thousand times without issue".... Any way the below code issues the ERROR: Variable DATACOLLECTION_FINISHTIME not found
proc tabulate data=&CMTH&YR._MAS_IIS_MOB_SF_NEW missing;
var DATACOLLECTION_FINISHTIME;
table DATACOLLECTION_FINISHTIME, n nmiss (min max median)*f=mmddyy10. range;
run;
A second pair of eyes would help. Thanks....
Yes
This is a guess without seeing your SAS log. You might need an extra dot for your SAS dataset macro variables name to resolve correctly:
proc tabulate data=&CMTH&YR.._MAS_IIS_MOB_SF_NEW
It depends on where the LIBREF and DATASET boundary is.
I verified the variable opening up and reviewing the SAS work dataset and the variable is present.
Hello @nupedoc79 ,
Have a look to the output of this little program :
%PUT &=CMTH.;
%PUT &=YR.;
proc contents data=&CMTH&YR._MAS_IIS_MOB_SF_NEW /* directory */ details;
title 'Contents Using the DETAILS Option';
run;
Are you sure you want to resolve both macro variables simultaneously? Maybe you want one of these to be resolved first such that a new macro variable name is constructed. The new macro variable name is then resolved in a "second round" by the macro processor.
Koen
You point is well taken. The two SAS macro variables resolve successfully in prior code in the program. I will however try your suggestion. Thanks
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.