Metaview HTML Generator

Metaview HTML Generator Syntax Reference

The syntax for invoking the Metaview HTML Generator is

   %META2HTM(argument=value, argument=value,...)

You must include the META2HTM 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.

Use the syntax reference to determine the valid values and uses for the Metaview HTML Generator. To help you locate the appropriate arguments, we have grouped them into the following categories:

Some arguments are required and are noted as such in their descriptions. If an argument is required only in some cases, the exceptions are noted. The macro provides default values for some arguments. (Default values are shown in bold.) If the default value is acceptable, do not include the argument on the macro invocation. If you want to use a value other than the default, specify the argument and the value on the macro invocation.

Note: For SAS 9.2 or later, the META2HTM macro is no longer supported. The documentation on this Web site is for Release 8.2 or earlier of SAS. Please migrate your applications to use ODS and the JavaMeta device driver.


Generating and Saving the HTML File

Note: All the arguments in this section are required, but can be omitted if you are accepting the default values.

capture=ON | OFF
indicates the capture mode for the macro. You must turn capturing on prior to running your SAS/GRAPH code. Use CAPTURE=OFF when you are finished capturing the metagraphics stream generated by your SAS/GRAPH code.

The following indicate which arguments can be used with CAPTURE=ON or CAPTURE=OFF:

  • The following arguments are valid with CAPTURE=ON and CAPTURE=OFF:
    CENTER HTMLFILE HTMLFREF OPENMODE PAGEPART


  • The following arguments are valid only with CAPTURE=OFF:
    SASPOWER SEPLOC SEPCLASS SPCLASS


  • If an argument does not appear above, it is valid with CAPTURE=ON only.


htmlfile=external-filename
specifies the name of the HTML file where the output will be written. If the file you specify does not exist, it is created for you.

Note: HTMLFILE and HTMLFREF are mutually exclusive arguments.



htmlfref=fileref
specifies the SAS FILEREF that points to the location of the HTML file where the output should be written. If the file you specify does not exist, it is created for you. When naming files, avoid using any of these reserved names.

Note: HTMLFILE and HTMLFREF are mutually exclusive arguments.



openmode=APPEND | REPLACE
indicates whether the new HTML output overwrites the information currently in the specified file or if the new output is appended to the end of the existing file. The default value is REPLACE. If you do not want to replace the current contents, supply APPEND to add your new HTML-enhanced output to the end of an existing file.

Notes:

  • Always use OPENMODE=APPEND with the CAPTURE=OFF argument.
  • OPENMODE=APPEND is not valid if you are writing your resulting HTML to a PDS on z/OS.


runmode=B | S
specifies whether you are running the macro in batch or server mode. Batch mode means that you are submitting the META2HTM macro in the Program Editor or you have included it in a SAS program. Server mode is used with Application Dispatcher applications and causes the generator to print the HTTP header required by Application Dispatcher. For more information, refer to the SAS/IntrNet Application Dispatcher documentation at http://support.sas.com/documentation.

Defining the <APPLET> tag

The arguments defined in this section appear on the <APPLET> tag in the HTML file. All required arguments are explicitly noted.
height=value
specifies the height of the applet in pixels. The default value is 600.

width=value
specifies the width of the applet in pixels. The default value is 780.

name=value
specifies the name for this instance of the applet. You need to use this argument only if you have more than one instance of the <APPLET> tag in your HTML file, and you have included your own scripts or DHTML that communicates with or acts on a particular instance of the applet.

align=value
specifies the positioning of the applet. Possible values are LEFT, RIGHT, TOP, BOTTOM, TEXTTOP, MIDDLE, ABSMIDDLE, BASELINE, BOTTOM or ABSBOTTOM.

alt=value
specifies the text that should be displayed by browsers that understand the <APPLET> tag, but cannot run Java applets. The default value is SAS Institute Inc. Metaview Applet.

archive=value
specifies a URL for the applet JAR file (metafile.zip). The recommended location (described in the installation instructions) is http://web_server_name/sasweb/graph/metafile.zip. This argument is required.

codebase=value
specifies a URL that identifies the directory used to find the .class files needed for the applet.

hspace=value
specifies the amount of horizontal space, in pixels, to the left and right of the applet.

vspace=value
specifies the amount of vertical space, in pixels, above and below the applet.

General page formatting

The arguments BGTYPE, BRTITLE, CENTER, CTEXT and DOCTYPE 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
specifies the type of background for your Web page. If you specify COLOR or IMAGE as the value, you must also use the BG argument. Valid values for BGTYPE are
NONE
does not use a background on your Web page. This is the default.

COLOR
causes the generator to use the background color specified in the BG argument. If you specify COLOR as the value, you must also specify the color in the BG argument.

IMAGE
indicates that you want to use a custom image as a background. If you specify 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
If you specified BGTYPE=IMAGE, value 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, value 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
specifies the value that appears as the title in the browser window title bar. By default, no title is displayed.

center=Y | N
determines whether all the output generated by the current invocation of the macro is centered. (See appending information under General Page Formatting.) The default is no center (N).

ctext=value
indicates whether you use the default global text color defined by the browser or by the color specified here. You can specify color values using the color name or the RGB value.

doctype=3.2 | value
specifies the information that is provided for the 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.



pagepart=ALL | HEAD | BODY | FOOT
specifies which parts of the HTML page is written to the file. You may want to write only some parts of the page if you are appending the results to an existing file. The valid values are:
ALL
writes the HTML header information, your formatted SAS data, and the HTML footer information to the specified file. This is the default behavior and it should be used when you are not appending additional information to the file.

HEAD
writes the HTML header information and your formatted SAS data to the HTML file. It does not include the HTML footer information. You should use HEAD when you are going to append additional output to this file from one of the formatters or from the Metaview HTML Generator.

BODY
writes only your formatted SAS data to the specified file.



FOOT
writes your formatted SAS data and the HTML footer information to the specified file.

For more information, see Using Page Formats.



saspower=value
adds the Powered by SAS logo to the bottom of the HTML page. You must provide the name and location of the image. This image automatically links to the SAS Web site. The value for this argument should be a fully-qualified pathname or valid URL. The default is not to display any image. Omit this argument if you do not want to use this image or have not acquired the logo.

use of this image is by permission only Use of this image is by permission only. See the Powered by SAS logo guidelines and agreement.




septype=NONE | RULE | IMAGE
specifies the type of separator that you want to use between the applets in your output. The generator uses a separator whenever it is invoked. Valid values are

NONE
overrides the default value and does not include a separator between the applets in your output.

RULE
This is the default. This value causes the generator to separate the applets in your output by adding the <HR> tag (a horizontal rule) to the HTML file following the end of the applet.

IMAGE
indicates that you want to use a custom image as a separator. If you specify IMAGE, you must also specify the SEPLOC argument to provide the name and location of the image that you want to use.



seploc=image-location
specifies the location of the image that you want to use as a separator between applets in the output. This argument is required if you specify SEPTYPE=IMAGE. The value for this argument should be a fully-qualified pathname or valid URL.

Controlling the applet behavior

cback=value
specifies the color of the applet control area. The color must be specified as RGB triplet having the form #rrggbb or 0xrrggbb. You cannot use a color name, such as red, with this release.

ctiphilt=value
specifies the data tip highlight color. The color must be specified as RGB triplet having the form #rrggbb or 0xrrggbb. You cannot use a color name, such as red, with this release.
pagectl=Y | N
specifies whether or not the page control appears in the applet control area. By default, the control appears if the metagraphics data contains more than one graph.
slidectl=Y | N
specifies whether or not the slide show control appears in the applet control area. By default, the control appears if the metagraphics data contains more than one graph.
tiptype=highlight | stick | fixed_stick
specifies type of tip that is displayed. The value you supply determines how the datatip looks.
  • The default value is HIGHLIGH and causes the data tip to appear slightly above the selection area and highlights the selection area with a red line.

  • A value of STICK causes the data tip to hover above the mouse pointer (tracking the mouse movements while your mouse is within the selection area) with a line pointing to the tip of the mouse pinter.

  • A value of STICK_FIXED causes the data tip to display above the selection area with a line pointing to the center of the selection area. The data tip does not follow the movement of the mouse pointer.
zoomctl=Y | N
specifies whether or not the zoom control appears in the applet control area. The default, the control is displayed.




Enabling Character Transcoding

For a description of these arguments and an explanation about how to use them, see Implementing Character Transcoding in "Character Transcoding and National Language Support."




Using Style Sheets

Arguments that embed or link to your style sheets

Use the following arguments to specify the location of your style sheets. These arguments are valid for all formatters and are described in Syntax for Including Style Sheets:

Arguments that enable you to specify the CLASS information

bdclass=value
specifies the name of the style sheet class to be used for the document body.

sepclass=value
specifies the name of the style sheet class to be used for the page separator. If the separator type is RULE, the supplied value is used on the CLASS attribute of the HR tag. For an IMAGE separator, the supplied value is used on the CLASS attribute of the IMG tag.

spclass=value
specifies the name of the style sheet class to be used for the Powered by SAS logo.

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.