ODS USEGOPT Statement

Determines whether ODS uses traditional SAS/GRAPH option settings.
Valid in: Anywhere
Category: ODS: Output Control
Restrictions: The ODS USEGOPTS option has no effect on graphics produced as a result of any of the ODS graphics functionality or the ODS GRAPHICS statement.

The ODS USEGOPTS option only affects the titles and footnotes for tables, not the contents of the table.

See: SAS/GRAPH: Reference

Syntax

Required Arguments

ODS USEGOPT
specifies that ODS use traditional SAS/GRAPH option settings for non-graphical output.
ODS NOUSEGOPT
specifies that ODS not use traditional SAS/GRAPH option settings for non-graphical output.

Details

Enabling Traditional SAS/GRAPH Graphics Options

While ODS USEGOPT is in effect, the settings for the following graphics options will affect all of your ODS output, including tables:
  • CTEXT=
  • CTITLE=
  • FTITLE=
  • FTEXT=
  • HTEXT=
  • HTITLE=
If ODS NOUSEGOPT is in effect, the settings for these graphics options will not override the value in the style definition for titles and footnotes in your ODS output.

Example: Enabling and Disabling Graphics Options

Features:

ODS HTML statement option:: FILE=

ODS LISTING statement action:: CLOSE

ODS NOUSEGOPT statement

ODS USEGOPT statement

Other features:
GOPTIONS statement::
FCTEXT=
FTITLE=
HTEXT=

PROC PRINT

TITLE statement

Data set: Exprev

Details

This example creates two HTML reports, one with the GOPTIONS enabled by using the ODS USEGOPT statement, and one with GOPTIONS disabled by using the ODS NOUSEGOPT statement.

Program

goptions reset=all  htext=2 ftitle=script ftext=script;
ods usegopt;
ods html file='opts.html';
title 'This Title Was Created With the USEGOPT Option Specified ' ;
title2 'The Graphics Option Settings are Turned On';
proc print data=exprev(obs=2);
run; 
ods nousegopt;
title 'This Title Was Created With the NOUSEGOPT Option Specified' ;
title2 'The Graphics Option Settings are Turned Off';
proc print data=exprev (obs=2) ;
run;

Program Description

Specify the GOPTIONS.The RESET=ALL option sets all graphics options to their default values and cancels all global statements. The HTEXT= option specifies that the text height for titles and footnotes be two units. The FTITLE= option specifies the font for titles and footnotes. The FTEXT option specifies the font for the text.
goptions reset=all  htext=2 ftitle=script ftext=script;
Enable the graphics options.While ODS USEGOPT is in effect, the settings for HTEXT= and CTEXT= graphics options will override values that are specified for titles and footnotes in the style definition.
ods usegopt;
Create HTML output, specify titles, and print the data set. The ODS HTML statement opens the HTML destination and creates HTML output. The output from PROC PRINT is sent to the body file specified by the FILE= option. The TITLE statements specify the titles for your output. The PRINT procedure prints the SAS data set Exprev. The OBS= option specifies two observations to be printed.
ods html file='opts.html';
title 'This Title Was Created With the USEGOPT Option Specified ' ;
title2 'The Graphics Option Settings are Turned On';
proc print data=exprev(obs=2);
run; 
Disable the graphics options.The NOUSEGOPT statement suppresses the use of the HTEXT= and CTEXT= graphics option settings for your output.
ods nousegopt;
Create HTML output, specify titles, and print the data set. The ODS HTML statement opens the HTML destination and creates HTML output. The output from PROC PRINT is sent to the body file specified by the FILE= option. The TITLE statements specify the titles for your output. The PRINT procedure prints the SAS data set Exprev. The OBS= option specifies two observations to be printed.
title 'This Title Was Created With the NOUSEGOPT Option Specified' ;
title2 'The Graphics Option Settings are Turned Off';
proc print data=exprev (obs=2) ;
run;

HTML Output

In the following example, the heights and fonts for the titles of the first table are specified by the FTITLE, FTEXT, and HTEXT options in the GOPTIONS statement. The heights and fonts for the titles of the second table are specified by the default style definition.
HTML Output