BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
martyvd
Fluorite | Level 6

Please see the following code.

 

 

ods tagsets.tableeditor file="&path\US&CYR1YY..htm"	
      options( 
               frozen_headers="yes"
               frozen_rowheaders="yes"
               banner_color_even="beige"
               banner_color_odd="white"
               header_bgcolor="teal"
			   header_fgcolor="white"
			   rowheader_bgcolor="lightblue"
			   gridline_color="gray"
			   header_size="12"  
               rowheader_size="12" 
			   data_size="11" 
              );
               
PROC TABULATE data=diswebtbldat NOSEPS MISSING FORMAT=comma9. FORMCHAR='              ';  

CLASS STATEFIP disyr sub1;
class sex age_d race ethnic / style={background=lightyellow}; 

tables all*(n f=5.1*pctn<sub1 all>) 
(sex all)*(pctn<sex all>)*f=5.1 
(age_d all)*(pctn<age_d all>)*f=5.1 
(race all)*(pctn<race all>)*f=5.1 
(ethnic all)*(pctn<ethnic all>)*f=5.1, 
all sub1 / rts=16 misstext='--' box=_page_ printmiss;
where disyr=&CYR1 and statefip NOT IN (&NOMOUNTCYR1);

keylabel all='Total' n='No.' pctn='%';
title1 height=11pt 'Substance Use Treatment Discharges by Primary Substance of Use,';
title2 height=11pt 'According to Sex, Age Group, Race, and Ethnicity among discharges aged 12 and older';
title3 height=11pt "Year = &CYR1,  UNITED STATES";

RUN;

ods tagsets.tableeditor close;

 

In my HTML output this generates a summary attribute of Procedure Tabulate: Table 1, as seen below. 

 

<table id="id1" class="table" cellspacing="1" cellpadding="7" rules="groups" frame="box" summary="Procedure Tabulate: Table 1">

 

I need to change the summary attribute to meaningfully describe the table, but I am unsure how to do this in SAS.

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
Diamond | Level 26

Hi:

  My guess is that if you change or use the CONTENTS= option, you'll find out which one is in effect for summary=, as you show. Here's some code to try:

ods html path='c:\temp' file='tabnodes.html';

ods proclabel '1 ODS PROCLABEL stmt';
proc tabulate data=sashelp.class contents='2 PROC TAB Stmt';
  class sex age;
  var height;
  table sex all,
        age*height*mean/contents='3 Table Stmt';
run;
ods html close;

 

My guess is that it is either #2 or #3.

 

Cynthia

View solution in original post

1 REPLY 1
Cynthia_sas
Diamond | Level 26

Hi:

  My guess is that if you change or use the CONTENTS= option, you'll find out which one is in effect for summary=, as you show. Here's some code to try:

ods html path='c:\temp' file='tabnodes.html';

ods proclabel '1 ODS PROCLABEL stmt';
proc tabulate data=sashelp.class contents='2 PROC TAB Stmt';
  class sex age;
  var height;
  table sex all,
        age*height*mean/contents='3 Table Stmt';
run;
ods html close;

 

My guess is that it is either #2 or #3.

 

Cynthia

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 871 views
  • 2 likes
  • 2 in conversation