Valid in: | Anywhere |
Category: | ODS: Third-Party Formatted |
Restriction: | When you open the destination, a style sheet is written and linked to the body file. Therefore, you cannot make style sheet changes from within your SAS program. For example, after the destination is open, changing the value of the STYLE= option has no effect. You can make style changes in either of the following ways: |
Interaction: | By default, when you execute a procedure that
uses the FORMCHAR system option (for example, PROC PLOT or PROC CHART),
ODS formats the output in SAS Monospace font. If you are creating
output that will be viewed in an operating environment where SAS software
is not installed, this output will not display correctly. This is
because without SAS, the SAS Monospace font is not recognized. To
make your document display correctly, include the following statement
before your SAS program: OPTIONS FORMCHAR="|----|+|---+=|-/\<>*"; |
z/OS specifics: | If you use graphics that are created with either
the ACTXIMG or JAVAIMG device drivers in the |
Note: | The ODS HTML statement supports Scalable Vector Graphics. Scalable Vector Graphics (SVG) is an XML language for describing two-dimensional vector graphics. For information about scalable vector graphics, see Using Scalable Vector Graphics in SAS/GRAPH: Reference. |
The following actions are available for the ODS HTML statement.
tabulate
.
The second anchor is named tabulate1
;
the third is named tabulate2
, and so
on.
Specifying new anchor names at various points in your program is useful when you want other Web pages to link to specific parts of your markup language output. Because you can control where the anchor name changes, you know in advance what the anchor name will be at those points.
The ARCHIVE attribute is a feature of Java 1.1. Therefore, if you are using the Java device driver, your browser must support this version of Java. Both Internet Explorer 4.01 and Netscape 4.05 support Java 1.1.
Use the CODEBASE= option to specify the file path. It is recommended that you do not put a file path in your ARCHIVE= option.
The value of APPLETOC= points to the location of the Java archive files that ship with the SAS system. To find out what the value of this option is, you can either look in the Options window in the Files folder under Environment Control, or you can submit the following procedure step:
proc options option=appletloc; run;
BASE= 'http://www.your-company.com/local-url/'In this case, ODS creates links that begin with the string
http://www.your-company.com/local-url/
.
The appropriate anchor-name completes
the link.
You must specify DYNAMIC next to the file-specification specified by the BODY=, CONTENTS=, PAGE=, FRAME=, or STYLESHEET= option, or next to the tagset-name specified by the TAGSET= option.
You must specify NO_BOTTOM_MATTER next to the file-specification specified by the BODY=, CONTENTS=, PAGE=, FRAME=, or STYLESHEET= option, or next to the tagset-name specified by the TAGSET= option.
If you append text to an external file, you must use a FILENAME statement with the appropriate option for the operating environment.
When you are opening a file that ODS has previously written to, use the ANCHOR= option to specify a new base name for the anchors. This step prevents duplicate anchors.
You must specify NO_TOP_MATTER next to the file-specification specified by the BODY=, CONTENTS=, PAGE=, FRAME=, or STYLESHEET= option, or next to the tagset-name specified by the TAGSET= option.
If you append text to an external file, you must use a FILENAME statement with the appropriate option for the operating environment.
When you are opening a file that ODS has previously written to, use the ANCHOR= option to specify a new base name for the anchors. This step prevents duplicate anchors.
You must enclose title-text in quotation marks.
You must enclose Uniform-Resource-Locator in quotation marks.
You must specify URL= 'Uniform-Resource-Locator' next to the file-specification specified by the BODY=, CONTENTS=, PAGE=, FRAME=, or STYLESHEET= option, or next to the tagset-name specified by the TAGSET= option.
You never need to specify this suboption with the FRAME= option because ODS files do not reference the frame file.
You must specify DYNAMIC next to the file-specification specified by the BODY=, CONTENTS=, PAGE=, FRAME=, or STYLESHEET= option, or next to the tagset-name specified by the TAGSET= option.
You must specify NO_BOTTOM_MATTER next to the file-specification specified by the BODY=, CONTENTS=, PAGE=, FRAME=, or STYLESHEET= option, or next to the tagset-name specified by the TAGSET= option.
If you append text to an external file, you must use a FILENAME statement with the appropriate option for the operating environment.
When you are opening a file that ODS has previously written to, use the ANCHOR= option to specify a new base name for the anchors. This step prevents duplicate anchors.
You must specify NO_TOP_MATTER next to the file-specification specified by the BODY=, CONTENTS=, PAGE=, FRAME=, or STYLESHEET= option, or next to the tagset-name specified by the TAGSET= option.
If you append text to an external file, you must use a FILENAME statement with the appropriate option for the operating environment.
When you are opening a file that ODS has previously written to, use the ANCHOR= option to specify a new base name for the anchors. This step prevents duplicate anchors.
You must enclose title-text in quotation marks.
You must enclose Uniform-Resource-Locator in quotation marks.
You must specify URL= 'Uniform-Resource-Locator' next to the file-specification specified by the BODY=, CONTENTS=, PAGE=, FRAME=, or STYLESHEET= option, or next to the tagset-name specified by the TAGSET= option.
You never need to specify this suboption with the FRAME= option because ODS files do not reference the frame file.
You must specify DYNAMIC next to the file-specification specified by the BODY=, CONTENTS=, PAGE=, FRAME=, or STYLESHEET= option, or next to the tagset-name specified by the TAGSET= option.
You must specify NO_BOTTOM_MATTER next to the file-specification specified by the BODY=, CONTENTS=, PAGE=, FRAME=, or STYLESHEET= option, or next to the tagset-name specified by the TAGSET= option.
If you append text to an external file, you must use a FILENAME statement with the appropriate option for the operating environment.
When you are opening a file that ODS has previously written to, use the ANCHOR= option to specify a new base name for the anchors. This step prevents duplicate anchors.
You must specify NO_TOP_MATTER next to the file-specification specified by the BODY=, CONTENTS=, PAGE=, FRAME=, or STYLESHEET= option, or next to the tagset-name specified by the TAGSET= option.
If you append text to an external file, you must use a FILENAME statement with the appropriate option for the operating environment.
When you are opening a file that ODS has previously written to, use the ANCHOR= option to specify a new base name for the anchors. This step prevents duplicate anchors.
You must enclose title-text in quotation marks.
You must enclose Uniform-Resource-Locator in quotation marks.
You must specify URL= 'Uniform-Resource-Locator' next to the file-specification specified by the BODY=, CONTENTS=, PAGE=, FRAME=, or STYLESHEET= option, or next to the tagset-name specified by the TAGSET= option.
You never need to specify this suboption with the FRAME= option because ODS files do not reference the frame file.
You must specify media-type next to the file-specification specified by the CSSSTYLE= option.
You must specify DYNAMIC next to the file-specification specified by the BODY=, CONTENTS=, PAGE=, FRAME=, or STYLESHEET= option, or next to the tagset-name specified by the TAGSET= option.
You must specify NO_BOTTOM_MATTER next to the file-specification specified by the BODY=, CONTENTS=, PAGE=, FRAME=, or STYLESHEET= option, or next to the tagset-name specified by the TAGSET= option.
If you append text to an external file, you must use a FILENAME statement with the appropriate option for the operating environment.
When you are opening a file that ODS has previously written to, use the ANCHOR= option to specify a new base name for the anchors. This step prevents duplicate anchors.
You must specify NO_TOP_MATTER next to the file-specification specified by the BODY=, CONTENTS=, PAGE=, FRAME=, or STYLESHEET= option, or next to the tagset-name specified by the TAGSET= option.
If you append text to an external file, you must use a FILENAME statement with the appropriate option for the operating environment.
When you are opening a file that ODS has previously written to, use the ANCHOR= option to specify a new base name for the anchors. This step prevents duplicate anchors.
You must enclose title-text in quotation marks.
You must enclose Uniform-Resource-Locator in quotation marks.
You must specify URL= 'Uniform-Resource-Locator' next to the file-specification specified by the BODY=, CONTENTS=, PAGE=, FRAME=, or STYLESHEET= option, or next to the tagset-name specified by the TAGSET= option.
You never need to specify this suboption with the FRAME= option because ODS files do not reference the frame file.
This option applies only to SAS programs that produce one or more device-based graphics, or graphics created by the SGPLOT procedure, the SGPANEL procedure, or the SGSCATTER procedure.
This option applies only to SAS programs that produce one or more device-based graphics, or graphics created by the SGPLOT procedure, the SGPANEL procedure, or the SGSCATTER procedure.
Use the HEADTEXT= option to define programs (such as JavaScript) that you can use later in the file.
<META your-metatext-is-here>
REPORT.XML
.
Additional body files are named REPORT1.XML
, REPORT2.XML
,
and so on.
Example:
BODY= 'MAY5.XML'
You must specify DYNAMIC next to the file-specification specified by the BODY=, CONTENTS=, PAGE=, FRAME=, or STYLESHEET= option, or next to the tagset-name specified by the TAGSET= option.
You must specify NO_BOTTOM_MATTER next to the file-specification specified by the BODY=, CONTENTS=, PAGE=, FRAME=, or STYLESHEET= option, or next to the tagset-name specified by the TAGSET= option.
If you append text to an external file, you must use a FILENAME statement with the appropriate option for the operating environment.
When you are opening a file that ODS has previously written to, use the ANCHOR= option to specify a new base name for the anchors. This step prevents duplicate anchors.
You must specify NO_TOP_MATTER next to the file-specification specified by the BODY=, CONTENTS=, PAGE=, FRAME=, or STYLESHEET= option, or next to the tagset-name specified by the TAGSET= option.
If you append text to an external file, you must use a FILENAME statement with the appropriate option for the operating environment.
When you are opening a file that ODS has previously written to, use the ANCHOR= option to specify a new base name for the anchors. This step prevents duplicate anchors.
You must enclose title-text in quotation marks.
You must enclose Uniform-Resource-Locator in quotation marks.
You must specify URL= 'Uniform-Resource-Locator' next to the file-specification specified by the BODY=, CONTENTS=, PAGE=, FRAME=, or STYLESHEET= option, or next to the tagset-name specified by the TAGSET= option.
You never need to specify this suboption with the FRAME= option because ODS files do not reference the frame file.
RECORD_SEPARATOR= '0D0A'x
RECORD_SEPARATOR= '0D25'x
RS=
You must specify DYNAMIC next to the file-specification specified by the BODY=, CONTENTS=, PAGE=, FRAME=, or STYLESHEET= option, or next to the tagset-name specified by the TAGSET= option.
You must specify NO_BOTTOM_MATTER next to the file-specification specified by the BODY=, CONTENTS=, PAGE=, FRAME=, or STYLESHEET= option, or next to the tagset-name specified by the TAGSET= option.
If you append text to an external file, you must use a FILENAME statement with the appropriate option for the operating environment.
When you are opening a file that ODS has previously written to, use the ANCHOR= option to specify a new base name for the anchors. This step prevents duplicate anchors.
You must specify NO_TOP_MATTER next to the file-specification specified by the BODY=, CONTENTS=, PAGE=, FRAME=, or STYLESHEET= option, or next to the tagset-name specified by the TAGSET= option.
If you append text to an external file, you must use a FILENAME statement with the appropriate option for the operating environment.
When you are opening a file that ODS has previously written to, use the ANCHOR= option to specify a new base name for the anchors. This step prevents duplicate anchors.
You must enclose title-text in quotation marks.
You must enclose Uniform-Resource-Locator in quotation marks.
You must specify URL= 'Uniform-Resource-Locator' next to the file-specification specified by the BODY=, CONTENTS=, PAGE=, FRAME=, or STYLESHEET= option, or next to the tagset-name specified by the TAGSET= option.
You never need to specify this suboption with the FRAME= option because ODS files do not reference the frame file.
The following suboptions can be used with these options: BODY= , CODE= , CONTENTS= , FRAME= , PAGE= , and STYLESHEET=.
You must specify DYNAMIC next to the file-specification specified by the BODY=, CONTENTS=, PAGE=, FRAME=, or STYLESHEET= option, or next to the tagset-name specified by the TAGSET= option.
You must specify NO_BOTTOM_MATTER next to the file-specification specified by the BODY=, CONTENTS=, PAGE=, FRAME=, or STYLESHEET= option, or next to the tagset-name specified by the TAGSET= option.
If you append text to an external file, you must use a FILENAME statement with the appropriate option for the operating environment.
When you are opening a file that ODS has previously written to, use the ANCHOR= option to specify a new base name for the anchors. This step prevents duplicate anchors.
You must specify NO_TOP_MATTER next to the file-specification specified by the BODY=, CONTENTS=, PAGE=, FRAME=, or STYLESHEET= option, or next to the tagset-name specified by the TAGSET= option.
If you append text to an external file, you must use a FILENAME statement with the appropriate option for the operating environment.
When you are opening a file that ODS has previously written to, use the ANCHOR= option to specify a new base name for the anchors. This step prevents duplicate anchors.
You must enclose title-text in quotation marks.
You must enclose Uniform-Resource-Locator in quotation marks.
You must specify URL= 'Uniform-Resource-Locator' next to the file-specification specified by the BODY=, CONTENTS=, PAGE=, FRAME=, or STYLESHEET= option, or next to the tagset-name specified by the TAGSET= option.
You never need to specify this suboption with the FRAME= option because ODS files do not reference the frame file.
Features: |
ODS HTML statement action:: CLOSE ODS HTML statement options:: OPTIONS (DOC=”HELP”) |
Other features: |
PROC PRINT |
Features: |
ODS HTML statement options:: OPTIONS (PAGEBREAK=”NO”) |
Other features: |
PROC PRINT |
ods html file="test.html" options(pagebreak='no');
options obs=2;
proc print data=Sashelp.Class; run;
proc print data=Sashelp.Class; run;
Features: |
ODS HTML statement action:: CLOSE
|
Other features: |
#BYVAL parameter in titles NOBYLINE|BYLINE system option OPTIONS statement PROC FORMAT PROC SORT PROC REPORT PROC TABULATE TITLE statement |
Data set: | Grain_Production |
Format: | $CNTRY. |
proc sort data=grain_production; by year country type; run;
ods html body='grain-body.htm' contents='grain-contents.htm' frame='grain-frame.htm' page='grain-page.htm'
newfile=page;
options nobyline; title 'Leading Grain-Producing Countries'; title2 'for #byval(year)';
proc report data=grain_production nowindows; by year; column country type kilotons; define country / group width=14 format=$cntry.; define type / group 'Type of Grain'; define kilotons / format=comma12.; footnote 'Measurements are in metric tons.'; run;
options byline; title2;
proc tabulate data=grain_production format=comma12.; class year country type; var kilotons; table year, country*type, kilotons*sum=' ' / box=_page_ misstext='No data'; format country $cntry.; footnote 'Measurements are in metric tons.'; run;
ods html close;
ods html body='grain-body.htm' contents='grain-contents.htm' frame='grain-frame.htm' page='grain-page.htm'
proc report data=grain_production nowindows; by year; column country type kilotons; define country / group width=14 format=$cntry.; define type / group 'Type of Grain'; define kilotons / format=comma12.; footnote 'Measurements are in metric tons.'; run;
proc tabulate data=grain_production format=comma12.; class year country type; var kilotons; table year, country*type, kilotons*sum=' ' / box=_page_ misstext='No data'; format country $cntry.; footnote 'Measurements are in metric tons.'; run;
href="grain-body.htm#IDX" href="grain-body1.htm#IDX1" href="grain-body2.htm#IDX2" href="grain-body3.htm#IDX3"
grain-body
, provides the basis for
the next part of the HREF. However, because the NEWFILE= option creates
a new file for each output object, ODS increments this base value
each time it creates a file. The resulting filenames become part of
the HREF. They are Grain-Body.htm, Grain-Body1.htm, Grain-Body2.htm,
and Grain-Body3.htm.
Features: |
|
Other features: |
FILENAME statement PROC PRINT PROC REPORT DATA _NULL_ statement |
Data set: | Grain_Production |
Format: | $CNTRY. |
options obs=10;
filename reports 'GrainReport.html';
ods html body=reports (no_bottom_matter)
style=Banker;
proc print data=grain_production; var country type kilotons; format country $cntry. kilotons comma12.; where year=1996; title 'Leading Grain-Producing Countries'; footnote 'Measurements are in metric tons.'; run;
ods html close;
filename reports '../ods/grain-reports-body.htm' mod;
filename reports 'GrainReport.html' mod;
data _null_; file reports; put "<h2>The preceding output is from PROC PRINT."; put "I am going to try a variety of procedures."; put "Let me know which procedure you prefer."; put "This report uses the Banker style.</h2>"; run;
ods html body=reports (no_top_matter no_bottom_matter)
anchor='report';
proc report data=grain_production nowindows; where year=1996; column country type kilotons; define country / group width=14 format=$cntry.; define type / group 'Type of Grain'; define kilotons / format=comma12.; run;
ods html close;
data _null_; file reports; put "<h2>The preceding output is from PROC REPORT."; put "It does not repeat the name of the country on every line."; put "This report uses the default style.</h2>"; run;
ods html body=reports(no_top_matter)anchor='end';
proc print data=grain_production; var country type kilotons; format country $cntry. kilotons comma12.; where year=1996; title 'Leading Grain-Producing Countries'; footnote 'Measurements are in metric tons.'; run;
data _null_; file reports; put "<h2>The preceding output is from PROC PRINT."; put "I am going to try a variety of procedures."; put "Let me know which procedure you prefer."; put "This report uses the Banker style.</h2>"; run;
proc report data=grain_production nowindows; where year=1996; column country type kilotons; define country / group width=14 format=$cntry.; define type / group 'Type of Grain'; define kilotons / format=comma12.; run;
data _null_; file reports; put "<h2>The preceding output is from PROC REPORT."; put "It does not repeat the name of the country on every line."; put "This report uses the default style.</h2>"; run;
Features: |
OPTIONS option:: PAGEBREAK=NO |
Other features: |
GPLOT procedure PRINT procedure GOPTIONS statement |
options nodate obs=10; goptions xpixels=500 ypixels=400;
ods html options(pagebreak='no');
title "Student Correlation"; symbol1 font="albnay amt" value='O' height=15pt color=pink; symbol2 font="albnay amt" value='X' height=15pt color=lib; proc gplot data=sashelp.class; plot height*weight=sex / des="" name="name"; run;
title; proc print data=sashelp.class; run; quit; ods html close;
ods html options(pagebreak='no');