Hi:
Since you are posting this in the ODS and Base SAS Reporting forum -- there is an automated way to create output REPORTS (different from output DATASETS) using ODS and the NEWFILE= option. For example, if you ran a PROC PRINT using NEWFILE= BYGROUP:
[pre]
ods html file='bygrp1.html' newfile=bygroup style=sasweb;
proc print data=student;
by group;
run;
ods html close;
[/pre]
Then if you had 10 groups, the HTML reports for each group would be nameed BYGRP1.HTML thru BYGRP10.HTML. However, these would be REPORT files, not SAS datasets.
In order to create DATASETS, you will have to use some kind of repetitive logic, either in a DATA step program, PROC SQL or even a PROC SORT step (a DATA step approach and a PROC SORT approach are shown below):
[pre]
**** DATA step example;
data work.A0001 work.A0002 work.A0003;
set student;
if group = 'A0001' then output work.A0001;
else if group = 'A0002' then output work.A0002;
else if group = 'A0003' then output work.A0003;
run;
*** PROC SORT example;
proc sort data=student out=work.A0001;
by group student;
where group eq 'A0001';
run;
proc sort data=student out=work.A0002;
by group student;
where group eq 'A0002';
run;
[/pre]
To create a program where you did not need to know the names or number of GROUP values ahead of time, you would need to move into the world of SAS Macro processing.
These papers are a good introduction into the SAS Macro facility and should give you some ideas about how to automate the process of creating multiple SAS datasets from your one big file.
http://www2.sas.com/proceedings/sugi28/056-28.pdf
http://support.sas.com/resources/papers/proceedings09/151-2009.pdf
http://www2.sas.com/proceedings/sugi30/130-30.pdf
http://support.sas.com/resources/papers/proceedings09/200-2009.pdf
cynthia