0
votes
%let dsin = pre_finalized;
data _null_;
set &dsin. (obs=1);

I also tried

%let dsin = data.pre_finalized;

Is the above the correct way to call my code. It is not the full code. But I am unsure if I am calling the dataset correctly. I keep on getting error logs. Any suggestions?

1
What are you trying to do? This could work, I suppose, but it just depends on what you're doing. Include errors/etc. in the question.Joe
Macro code still has to generate valid code. What does your working code look like without macro variables?Reeza
Can you please show what error are you getting to get a better idea of the issue ?gaurav2141

1 Answers

0
votes

If i understand your question correctly, you are trying to call a dataset using a macro variable. Below is the code which i quickly tested and its working. Please see if this helps.

%let data=sashelp.class;

data abc;
set &data. (obs=1);
run;