Sample 45372: Modify the output from PROC GLM to remove the text string 'Dependent Variable: variable name' from ODS RTF output
GLM procedure output includes the label "Dependent Variable: [variable name]" when displaying the output from the objects OverallANOVA and ModelANOVA. When routing the output using ODS, you can create a style template to override this behavior.
In the sample code on the Full Code tab, the COLOR attribute is modified for the element PROCTITLE that is being passed to PROC GLM. For comparison purposes, similar code is run a second time without the style template to show the default output.
You can use this method if you are running the second maintenance release of SAS® 9.3 (TS1M2) or earlier.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
PROC TEMPLATE is used to create a style template. In the template, the COLOR attribute is modified in the element PROCTITLE, which is the source of the label. For comparison purposes, PROC GLM is run a second time to display the output without applying the template.
data a;
do a = 1 to 4;
do b = 1 to 4;
do c = 1 to 4;
n = int(6*ranuni(1));
do i = 1 to n;
y = a + b + rannor(1);
output;
end;
end;
end;
end;
run;
proc template;
define style newstyle;
parent=styles.printer;
class proctitle / color=white;
end;
run;
options nodate nonumber;
ods select 'Type I Model Anova';
ods rtf file="testAnova.rtf" style=newstyle bodytitle;
title1 'First Output';
title2 color=purple 'No Dependent Variable: [Variable]';
proc glm data=a;
class a;
model y = a;
run;
quit;
ods select 'Type I Model Anova';
ods rtf style=styles.rtf startpage=no;
title1 'Second Output';
title2 color=purple 'Back to default';
proc glm data=a;
class a;
model y = a;
run;
quit;
ods rtf close;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
Create a style template that changes the color of this text string to the background color of the document.
Type: | Sample |
Topic: | Query and Reporting ==> Creating Reports Query and Reporting Analytics ==> analytics
|
Date Modified: | 2012-02-09 14:31:40 |
Date Created: | 2012-01-11 20:29:37 |
Operating System and Release Information
SAS System | SAS/STAT | z/OS | 9.3 TS1M0 | 9.3 TS1M2 |
Microsoft® Windows® for x64 | 9.3 TS1M0 | 9.3 TS1M2 |
Microsoft Windows Server 2003 Datacenter Edition | 9.3 TS1M0 | 9.3 TS1M2 |
Microsoft Windows Server 2003 Enterprise Edition | 9.3 TS1M0 | 9.3 TS1M2 |
Microsoft Windows Server 2003 Standard Edition | 9.3 TS1M0 | 9.3 TS1M2 |
Microsoft Windows Server 2003 for x64 | 9.3 TS1M0 | 9.3 TS1M2 |
Microsoft Windows Server 2008 | 9.3 TS1M0 | 9.3 TS1M2 |
Microsoft Windows Server 2008 for x64 | 9.3 TS1M0 | 9.3 TS1M2 |
Microsoft Windows XP Professional | 9.3 TS1M0 | 9.3 TS1M2 |
Windows 7 Enterprise 32 bit | 9.3 TS1M0 | 9.3 TS1M2 |
Windows 7 Enterprise x64 | 9.3 TS1M0 | 9.3 TS1M2 |
Windows 7 Home Premium 32 bit | 9.3 TS1M0 | 9.3 TS1M2 |
Windows 7 Home Premium x64 | 9.3 TS1M0 | 9.3 TS1M2 |
Windows 7 Professional 32 bit | 9.3 TS1M0 | 9.3 TS1M2 |
Windows 7 Professional x64 | 9.3 TS1M0 | 9.3 TS1M2 |
Windows 7 Ultimate 32 bit | 9.3 TS1M0 | 9.3 TS1M2 |
Windows 7 Ultimate x64 | 9.3 TS1M0 | 9.3 TS1M2 |
Windows Vista | 9.3 TS1M0 | 9.3 TS1M2 |
Windows Vista for x64 | 9.3 TS1M0 | 9.3 TS1M2 |
64-bit Enabled AIX | 9.3 TS1M0 | 9.3 TS1M2 |
64-bit Enabled HP-UX | 9.3 TS1M0 | 9.3 TS1M2 |
64-bit Enabled Solaris | 9.3 TS1M0 | 9.3 TS1M2 |
HP-UX IPF | 9.3 TS1M0 | 9.3 TS1M2 |
Linux | 9.3 TS1M0 | 9.3 TS1M2 |
Linux for x64 | 9.3 TS1M0 | 9.3 TS1M2 |
Solaris for x64 | 9.3 TS1M0 | 9.3 TS1M2 |