Skip to content

Instantly share code, notes, and snippets.

@ymattu
Created August 4, 2016 15:47
Show Gist options
  • Save ymattu/4d35a137c8226329ea2cc49334fc7517 to your computer and use it in GitHub Desktop.
Save ymattu/4d35a137c8226329ea2cc49334fc7517 to your computer and use it in GitHub Desktop.
%macro chloop;
%let loopval= A B C D E;
%do i=1 %to %sysfunc(countw(&loopval));
%let j=%scan(&loopval,&i);
data mydata&j;
A=1;
run;
%end;
%mend;
%chloop;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment