Previous Page | Next Page

TEMPLATE Procedure: Creating Markup Language Tagsets

Example 8: Using the STACKED_COLUMNS Attribute in a Tagset


PROC TEMPLATE features:

DEFINE TABLE statement:

NOTES statement

COLUMN statement

DEFINE statement (for columns)

DEFINE TAGSET statement:

Tagset attribute:

PARENT= attribute

STACKED_COLUMNS= attribute

Other ODS features:

ODS directory.tagset-name statement

ODS PHTML statement

ODS _ALL_ CLOSE statement



Program Description

This example shows the difference between stacking data one column on top of another and placing data side by side. (For more information on stacked columns, see the DEFINE TABLE Statement.)


Program

 Note about code
proc template;
   define table Base.Standard;
      notes 'Table template for PROC Standard.';
      column name (mean std) n label;
      define name;  header='Name' varname='Name' style=RowHeader; end;
      define mean;  header='Mean/Std Dev' varname='Mean' format=D12.;
end;
      define std;   header='/Standard/Deviation'
         varname='stdDev' format=D12.; end;
      define n;     header='N' format=best.; end;
      define label; header='Label' varname='Label'; end;
      byline wrap required_space=3;
   end;
run;
 proc template;
   define tagset tagsets.myhtml;
        parent=tagsets.phtml;
        stacked_columns=no;
   end;
run;
 
 
 Note about code
proc template;
   define tagset tagsets.myhtml;
        parent=tagsets.phtml;
        stacked_columns=no;
   end;
run;
 Note about code
ods tagsets.myhtml file='not_stacked.html'; 
proc standard print data=sashelp.class; 
run;  
 
 Note about code
ods _all_ close;

Output with Values Side by Side

[Output with Values Side by Side]

 Note about code
ods phtml file='stacked.html';  
proc standard print data=sashelp.class; 
run;  
ods _all_ close;  

Program


Program Output

Output with Values Stacked One on Top of Another

[Output with Values Stacked One on Top of Another]

Previous Page | Next Page | Top of Page