06-09-2017 02:15 AM - edited 06-09-2017 02:18 AM
06-09-2017 03:02 AM
I bet your log looks like this:
WARNING: Apparent invocation of macro DATE not resolved. 24 %let k=XYZ.DT%DATE.; 25 data temp; 26 dsn="&k"; WARNING: Apparent invocation of macro DATE not resolved. 27 run;
So what do you try to achieve by using the macro call(!) %date in the %let?
06-09-2017 03:31 AM
It's difficult to remove both warnings. The simplest way would be if you are allowed to change the value of your macro variable:
06-09-2017 04:31 AM
I am going to assume from your code there that DSN means that XYZ is the library name and DT%DATE. is the dataset name, and that your keeping this information for some reason. Personally I don't like data (dates in this case) in dataset names, as this complicates any further programming activity. I also question why you need a macro variable, and dataset to hold this information. Once you have created the libname referece XYZ then you will automatically have this information in sashelp.vtable, so you can simply your life by just doing:
libname xyz "..."; data temp; set sashelp.vtable (where=(libname="XYZ" and substr(name,1,2)="DT")); run;
All macro language is is a way to create Base SAS code, it is not a replacement for Base SAS.
Need further help from the community? Please ask a new question.