Created
September 25, 2015 17:37
-
-
Save statgeek/4bfb7574713bedf4e011 to your computer and use it in GitHub Desktop.
SAS - split file into subsets using call execute
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
proc sort data=sashelp.class out=class; | |
by age; | |
run; | |
data _null_; | |
set class; | |
by age; | |
retain count; | |
if first.age then do; | |
count+1; | |
*create string; | |
str1='data sub'||put(count,z3.)||"; set sashelp.class; where age="||put(age, 2.)||";run;"; | |
call execute(str1); | |
end; | |
run; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment