Here is a snippet from one of my saved macros, when calling the macro and passing 'dataset', in your case, begyr, it should look similar to this, /*Split Dataset by number of observations*/
/*Usage, %SPLIT (DATASETNAME,OBS) - Example %SPLIT (FINAL,100000)*/
%macro split(dataset,splitby);
data _null_;
set &dataset nobs=num; I'm calling the variable dataset by using &dataset within the macro. So yours would be like this, /*Split Dataset by number of observations*/
/*Usage, %SPLIT (DATASETNAME,OBS) - Example %SPLIT (FINAL,100000)*/
%macro split(begyr,splitby);
data _null_;
set &begyr nobs=num;
more stuff blah blah
end the macro
%mend split;
call the macro and assign 2016 to 'begyr'
%SPLIT (2016,100)
... View more