The SAS Output Delivery System and reporting techniques

diff format in listing and html using tabulate

Reply
New Contributor
Posts: 2

diff format in listing and html using tabulate

table var1*var2, var3 is used in proc tabulate
In the listing file, it shows var1 and var2 in 1 column like
AAAAA
111 100
222 200
BBBBB
100 10

But, in HTML output, var1 and var2 are shown in 2 columns
AAAAA 111 100
222 200
BBBBB 100 10

How can I make the HTML output same as in listing output? Thanks
SAS Super FREQ
Posts: 8,868

Re: diff format in listing and html using tabulate

Hi:
Not sure what you're seeing. When I use this code, I get the same output in both the LISTING window and the HTML (viewed in a browser).

cynthia
[pre]
data class;
set sashelp.class;
var1=sex;
var2 = age;
var3 = height;
run;

ods listing;
ods html file='c:\temp\comptab.html' style=sasweb;
proc tabulate data=class;
class var1 var2;
var var3;
table var1*var2,
var3 ;
run;
ods html close;
[/pre]
New Contributor
Posts: 2

Re: diff format in listing and html using tabulate

I used the following code and the 2 outputs are diff.

ODS HTML FILE=ODSOUT RS=NONE STYLE=SASWEB;
PROC TABULATE DATA=SASHELP.CLASS NOSEPS;
CLASS SEX AGE;
CLASSLEV SEX / S=[JUST=L VJUST=TOP];
CLASSLEV AGE / S=[JUST=L];
VAR HEIGHT;
TABLE SEX=' '*AGE=' ', HEIGHT
/RTS=55 INDENT=5 S=[RULES=NONE BORDERWIDTH=0
JUST=L];
SAS Super FREQ
Posts: 8,868

Re: diff format in listing and html using tabulate

Hi:
NOSEPS and INDENT=5 are LISTING options -- they only work in the LISTING destination or the OUTPUT window. They are basically ignored by other ODS DESTINATIONS (such as HTML). In the documentation:
http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/a002473736.htm#a003065557

when you see this restriction:
Restriction: The NOSEPS option affects only the traditional SAS monospace output destination.

It means that the option will only work in the LISTING window.

cynthia

Here's the doc site for the INDENT= option:
http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/a002473740.htm#a003068110
where it explains that HTML, RTF and PDF will not use INDENT= the same way as LISTING:
Restriction: In the HTML, RTF, and Printer destinations, the INDENT= option suppresses the row headings for class variables but does not indent nested row headings.
Ask a Question
Discussion stats
  • 3 replies
  • 161 views
  • 0 likes
  • 2 in conversation