f



Advanced Set Statement Processing Problem

Hello everone,
=A0
I'm interested in adding some label rows and some blank rows to a SAS datas=
et before submitting it to Proc Report. Rows 1 through 6 should fall under =
the heading "Cancer Type." Rows 7 through=A011 should fall under the headin=
g "Cancer Stage." And rows 12 through=A015 should fall under the heading "C=
ancer Metastatic." Which heading a row should fall under is indicated in a =
variable called Category.=20
=A0
Below is some code that works but is hideously ugly. I was just wondering i=
f someone could show me a better way of doing it. I know it's=A0possible to=
 get a table something like I want by adding adding variables to my data, d=
efining them as group variables, and then specifying breaks. But in the end=
 I have to create these additional variables. And I still wind up post-proc=
essing the table using dde to get rid of a row at the bottom that I don't w=
ant. So I was thinking this might be another option.
=A0
Thanks,
=A0
Paul
=A0
data line;
output;
stop;
set freqs;
run;
=A0
data freqs2;
set line;
diagnosis =3D 'Cancer Type';
output;
do pt =3D 1, 2, 3, 4, 5, 6;
set freqs point =3D pt;
output;
end;
set line;
output;
set line;=20
diagnosis =3D 'Cancer Stage';
output;
do pt =3D 7, 8, 9, 10, 11;
set freqs point =3D pt;
output;
end;
set line;
output;
set line;=20
diagnosis =3D 'Cancer Metastatic';
output;
do pt =3D 12, 13, 14, 15;
set freqs point =3D pt;
output;
end;
run;
=A0=0A=0A=0A      _________________________________________________________=
_________=0ALooking for the perfect gift? Give the gift of Flickr! =0A=0Aht=
tp://www.flickr.com/gift/
0
7/1/2009 6:09:36 PM
comp.soft-sys.sas 142828 articles. 3 followers. Post Follow

0 Replies
3264 Views

Similar Articles

[PageSpeed] 8

Reply: