The syntax for the HTML Output Formatter is
%OUT2HTM(argument=value, argument=value,...);
You must include the Output Formatter macro call with your SAS code. You cannot call it from a SAS command line. When including the macro call in your SAS code, you can use a list of arguments that are contained within parentheses and are separated with commas. You must end the call with a semicolon.
When naming files, you should avoid using certain reserved names. Click here to view a list of reserved names.
The Output Formatter macro uses the following types of arguments:
Most of the following arguments are required for the macro invocation. If the argument is required only in some cases, the exceptions are noted.
capture=ON | OFF
CAPTURE=ON
as one of the arguments.
Do not include any formatting arguments in the
CAPTURE=ON
statement. When turning capturing on
for the Log, you must include WINDOW=LOG
. (The
Output Formatter looks at formatting arguments only when you
turn capturing off, not on.)
To stop capturing and write the formatted HTML to the
specified file, you must invoke the macro again and
include CAPTURE=OFF
in the parameter list.
When turning capturing off for the Log window, you must
include WINDOW=LOG
. To specify formatting
arguments and override the defaults set in the selected
property list, enter formatting arguments in the
CAPTURE=OFF
clause.
Include a matching CAPTURE=OFF
for each
CAPTURE=ON
argument for the window specified.
For example, if you turn capturing on for the Log window,
you must also turn it off for the Log window.
htmlfile=external-file
Note: HTMLFILE
and HTMLFREF
are
mutually exclusive arguments.
htmlfref=fileref
Note: HTMLFILE
and HTMLFREF
are
mutually exclusive arguments.
openmode=APPEND | REPLACE
APPEND
to add your new HTML-enhanced output to
the end of an existing file. This argument is required only
if you want to override the default setting. Specify
REPLACE
to delete the information in an existing
file and replace it with the new output. You must provide
this argument when you turn capturing off.
Note: OPENMODE=APPEND
is not valid is you are
writing your resulting HTML to a PDS on z/OS.
proploc=property-list-name
putnfile=Y |
N
Y
if you have modified your SAS program
to use the enhanced formatting capabilities provided with PUT
and FILE support. The default (N
) indicates that
this output does not contain special formatting
instructions.runmode=I | B
RUNMODE=B
when running in batch mode to avoid
confusion. You must include the argument when running in
interactive mode, which is available only with Release 6.12
of SAS software.
If you are using the Output Formatter with the Application
Dispatcher, you must use RUNMODE=S
. Using
RUNMODE=S
tells the formatter to print the
HTTP header required by the Application Dispatcher before creating any
output. For more information, refer to the SAS/IntrNet Application Dispatcher
documentation at http://support.sas.com/documentation.
window=OUTPUT | LOG
WINDOW=LOG
, when turning capturing on or
off for the Log window (the default is to capture information
in the Output window).
The remaining arguments provide formatting information and represent the properties that you can change to create customized HTML output.
To use the browser's attribute settings for those arguments
below where DEFAULT
is an option, specify
DEFAULT
. (Using DEFAULT
tells the
Output Formatter to ignore settings in the property list.)
Otherwise, specify the value, for example, the color.
Note: The Output Formatter does not check for errors on fonts, colors, or sizes you specify. It simply allows any selection you type. So, you should specify values that are supported on the system where the HTML page will be viewed.
These arguments apply to the entire page for the current invocation of the macro. So, if you append data, the attributes of existing results will not change. You may want to use these arguments only when you replace, rather than append, pages. The rendering of some formatting arguments varies per browser. Some browsers may not support some of these options.
bgtype=NONE | COLOR | IMAGE
COLOR
or IMAGE
as the
value, you must also use the BG
argument. Valid
values for BGTYPE
are
NONE
COLOR
BG
argument. If you
specify COLOR
as the value, you must also
specify the color in the BG
argument.
IMAGE
IMAGE
as the
value, you must also specify the BG
argument to provide the name and location of the image.
Some browsers may not support the use of background
images.
bg=value
BGTYPE=IMAGE
, this identifies
the fully-qualified path and filename of a background image
that you want to use on your Web page. If you specified
BGTYPE=COLOR
, this indicates the specific
background color you want to use on your page. You can
specify color values using the color name or the RGB value.
brtitle=value
center=Y | N
N
).
Note: Do not use CENTER
when trying to line
elements up in tabular output. The CENTER
tag
centers each line individually according to its line
length and not according to the data and so may not line
up as you want.
ctext=value | DEFAULT
TCOLOR
argument overrides the value specified by
CTEXT
. You can specify color values using the
color name or the RGB value. doctype=3.2 |
value
DOCTYPE
tag in the HTML file. The default value
is 3.2
, which writes the following line to the
top of your HTML file:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
If you want something other than the default text, you can
provide the exact line to be added. If you supply a blank
for value
, nothing is added to the top
of the file. If you supply a value other than 3.2, you
must include the exact text that you want added.
For example, if you want to reference a different DTD, you
must provide the entire string, including
!DOCTYPE
and the opening and closing angle
brackets.
encode=Y | N
Y
. This displays the actual brackets in
the browser. By default, the brackets are encoded. To have
the Output Formatter pass the brackets to the browser (where
the browser attempts to act on them as an HTML-formatting
instruction), specify N
. pagepart=ALL | HEAD |
BODY | FOOT
ALL
HEAD
HEAD
when you
are going to append additional output from one of the
Formatters to this file.BODY
FOOT
For more information, see Using Page Formats.
saspower=value
Note: To display an image and automatically link to the
SAS Web site when running in interactive mode, you must
include the argument along with the %OUT2HTM
macro call. The following example shows how to include the
SASPOWER
argument in interactive mode:
%out2htm(runmode=i, saspower=saspower.gif);
Use of this image is by permission only. See the Powered by SAS logo guidelines and agreement. |
septype=NONE | RULE | IMAGE
NONE
RULE
<HR>
(a horizontal rule) to the HTML
file following the page end information supplied by the
SAS procedure.
IMAGE
IMAGE
as the
value, you must also specify the SEPLOC
argument to provide the name and location of the image
that you want to use.seploc=image-location
SEPTYPE=IMAGE
. The
value for this argument should be a fully-qualified pathname
or valid URL.
The next nine arguments provide color specifications for the
output components title, footnote, byline, header, notes,
warnings, errors, source, and data. When you specify any of
these arguments, the HTML tag
<FONT COLOR=value>
is added to all the
appropriate lines in your HTML-formatted output. You can specify
color values by using the color name or the RGB values.
bcolor=value | DEFAULT
dcolor=value | DEFAULT
ecolor=value | DEFAULT
fcolor=value | DEFAULT
hcolor=value | DEFAULT
ncolor=value | DEFAULT
scolor=value | DEFAULT
tcolor=value | DEFAULT
wcolor=value | DEFAULT
You can specify a custom font (or face) for each of the nine
output components: title, footnote, byline, header, notes,
warnings, errors, source, and data. When you specify any of
these arguments, the HTML tag
<FONT FACE=value>
is added to all the
appropriate lines in your HTML-formatted output. The default for
each of these arguments is to use your browser font settings.
bface=value | DEFAULT
dface=value | DEFAULT
eface=value | DEFAULT
fface=value | DEFAULT
hface=value | DEFAULT
nface=value | DEFAULT
sface=value | DEFAULT
tface=value | DEFAULT
wface=value | DEFAULT
You can also increase or decrease the default size of the text
for each of the nine output components: title, footnote, byline,
header, notes, warnings, errors, source, and data. When you
specify any of these arguments, the HTML tag
<FONT SIZE=value>
is added to all the
appropriate lines in your HTML-formatted output.
Valid values are N
, +N
, and
-N
, where N
is an integer. Valid
values are specific to each browser.
bsize=value | DEFAULT
dsize=value | DEFAULT
esize=value | DEFAULT
fsize=value | DEFAULT
hsize=value | DEFAULT
nsize=value | DEFAULT
ssize=value | DEFAULT
tsize=value | DEFAULT
wsize=value | DEFAULT
The remaining nine arguments allow you to change the HTML formatting tags that are associated with each component type. If you use these arguments to change the associated formatting tags, you may also change the font, size, and emphasis of the output component. This can cause undesired effects if you have also specified custom values for the arguments that control color, face, and size.
For a list of all of the valid HTML tag names that you can use with these arguments, see the list of available tags provided with the Output Formatter.
To display the results without specifying a tag for each of the
following arguments, use NO FORMATTING
for the
value, for example, BTAG=NO FORMATTING
. Otherwise,
specify the tag name for VALUE
.
btag=value
PREFORMATTED TEXT
.dtag=value
PREFORMATTED TEXT
.etag=value
PREFORMATTED + STRONG
.Note: The Output Formatter converts only those NOTE strings tagged with the SAS note attribute. If a "Note:" is not tagged this way, you may see the resulting text without the specified note lines formatting. The Output Formatter handles the line according to the settings for that particular line type.
ftag=value
PREFORMATTED + HEADER 3
.htag=value
PREFORMATTED + STRONG
.ntag=value
PREFORMATTED TEXT
. Also, see the Note under
the ETAG argument. stag=value
PREFORMATTED TEXT
.ttag=value
PREFORMATTED + HEADER 3
.wtag=value
PREFORMATTED + EMPHASIS
. Also, see the
note under the ETAG argument. tranlist=transcoding-list-name
charset=character-set-name
The following arguments are valid for all formatters and are described in Syntax for Including Style Sheets:
sshref1-sshref5=value
sstype1-sstype5=value
ssrel1-ssrel5=value
ssrev1-ssrev5=value
sstitle1-sstitle5=value
ssmedia1-ssmedia5=value
ssfile1-ssfile5=value
ssfref1-ssfref5=value
bclass=value
bdclass=value
dclass=value
eclass=value
fclass=value
hclass=value
nclass=value
sclass=value
sepclass=value
RULE
, the supplied value is used on the
CLASS
attribute of the HR
tag. If
the separator type is IMAGE
, the supplied value
is used on the CLASS
attribute of the
IMG
tag. spclass=value
tclass=value
wclass=value
Note: z/OS is the successor to the OS/390 and MVS operating systems. SAS/IntrNet 9.1 for z/OS is supported on the MVS, OS/390, and z/OS operating systems and, throughout this document, any reference to z/OS also applies to OS/390 and MVS, unless otherwise stated.