0
votes

Issue: I'm running in the same code two separate proc tabulate which generate two seaparate cross frequency tables. I would be able to generate two different result reports as output instead of the standard one aggregating the two outputs in the same result page, without the need to create two separate codes. There is any method to achive this?

Update1 : Below is the output of the two proc tabulate I want separate into two differente objects.

enter image description here

1
Are you running your sas code in batch, SAS Studio, DI Studio or Enterprise Guide? - momo1644

1 Answers

0
votes

You can use the SAS ODS (Output Delivery System) and output your results to two different files. (the file can be a pdf, html, rtf).

Code below based on SAS Support Example will split the output into two files ttest1.htm & ttest2.htm

title 'Comparing Group Means';

data Scores;
   input Gender $ Score @@;
   datalines;
f 75  f 76  f 80  f 77  f 80  f 77  f 73
m 82  m 80  m 85  m 85  m 78  m 87  m 82
;
ods html body='ttest1.htm' style=HTMLBlue;
proc ttest;
   class Gender;
   var Score;
run;
ods html close;
ods html body='ttest2.htm' style=HTMLBlue;
proc ttest;
   class Gender;
   var Score;
run;
ods html close;

In SAS Enterprise Guide:

You can add the option to create your SAS report output in RTF and PDF formats. This will show the page break in one file/report. Go to Tools/Options then check the output formats you want and re-run your project.

EG Options