Previous Page | Next Page

TEMPLATE Procedure: Creating Markup Language Tagsets

Event Variables


Event variables include text, formatting, and data values that are associated with events. These variables originate in many places, such as table templates, the procedures, titles, bylines, and processing. Event variables also include any style attributes that are used in the program. The following table lists the internally generated event variables that are used in the DEFINE EVENT statement of PROC TEMPLATE.


Tables of Event Variables

508 Accessibility* Variables
Event Variable Description
ABBR Specifies an abbreviation for the event variable.
ACRONYM Specifies an acronym for an event variable.
ALT Specifies an alternate description of an event variable.
CAPTION Specifies the caption for a table.
LONGDESC Specifies the long description of an event variable.
SUMMARY Specifies a summary of a table.
* SAS includes these accessibility and compatibility features to improve the usability of SAS for users with disabilities. These features are related to accessibility standards for electronic information technology that are adopted by the U.S. Government under Section 508 of the U.S. Rehabilitation Act of 1973, as amended.

Data Variables
Event Variable Description
_NAME_ Contains the name of the current variable.
_VALUE_ Contains the value of the current variable.
DNAME Specifies the name of the column in the data component to associate with the current column. DNAME is specified with the DATANAME= attribute in a column template. For information, see the DATANAME= attribute.
LABEL Specifies a label for the variable. The LABEL event variable is set with the LABEL= attribute in the column template. For information, see the LABEL= attribute.
NAME Specifies the name of the variable. NAME is set with the VARNAME= attribute in the column template. For information, see the VARNAME= attribute.
VALUE Specifies the current value.
VALUECOUNT Specifies the count of the variable.

Event Meta Variables
Event Meta Variables Description
EMPTY Sets a flag to determine whether an event is called as an empty tag.
EVENT_NAME Specifies the requested event name.
STATE Specifies the current state of the event, which is either START or FINISH.
TRIGGER_NAME Specifies the name of the event that is triggered.

Formatting Data
Event Variable Description
CLOSURE Specifies whether the endpoints of a format range are included or excluded, for example (<-, -, -<, <-<, and so on).
COL_ID Specifies the column ID to identify columns. Used for the OIMDBM format type by the XML LIBNAME engine.
DATAENCODING Specifies the encoding type for Raw value. It is always Base64.
MISSING Specifies the value that indicates that no data value is stored. By default, SAS uses a single period (.) for a missing numeric value and a blank space for a missing character value. In addition, for a numeric missing value, a special missing value indicator represents different categories of missing data by assigning one of the letters A through Z, or an underscore.
NO_WRAP Specifies that the current cell should not wrap text or insert hyphens.
PRECISION Specifies the number of places to the right of the decimal. The PRECISION variable is used by the XML LIBNAME engine.
RANGEEND Specifies the end value of a range in a format.
RANGESTART Specifies the start value of a range in a format
RAWVALUE Specifies the base64 encoding of the stored machine representation of the original value.
SASFORMAT Specifies the SAS format used to format a value.
SCALE Specifies the total number of places in the floating point number. The SCALE event variable is used by the XML LIBNAME engine.
TYPE Specifies the STRING, DOUBLE, CHAR, BOOL, or INT data type.
UNFORMATTEDTYPE Specifies the data type before formatting.
UNFORMATTEDVALUE Specifies the value before formatting.
UNFORMATTEDWIDTH Specifies the width before formatting.

General Use Variables
Variable Description
ANCHOR Specifies the current anchor, which is the last value of the anchor tag (for example, IDX).
DATA_VIEWER Specifies the name of the Data Viewer, such as Table, Batch, Tree, Graph, Report, or Print.
DATE Specifies the date.
DEST_FILE Specifies the current destination file, which is one of the following: body, contents, pages, frame, code, or stylesheet.
FIRSTPAGE Specifies the first page of the output file.
LANGUAGE Specifies the language of the current output. The LANGUAGE event variable is set only when it is an Asian language.
OUTPUT_LABEL Specifies the label of the current output object.
OUTPUT_NAME Specifies the name of the current output object.
OUTPUT_TYPE Specifies the output type as specified in the tagset.
PAGE_COUNT Specifies the page count since the files were opened.
PROC_COUNT Specifies how many procedures have run since the files were opened.
PROC_NAME Specifies the name of the current procedure.
SASLONGVERSION Specifies the long format of the SAS version.
SASVERSION Specifies the short format of the SAS version.
SPACE Specifies the string that the tagset uses for a nonbreaking space.
SPLIT Specifies the string that the tagset uses for line breaks.
STYLE Specifies the current style that is in use.
STYLE_ELEMENT Specifies the name of the current style element.
SUPPRESS_CHARSET Specifies the Suppress Charset Registry setting.
TIME Specifies the time.
TOCLEVEL Specifies the table of contents level.
TOTAL_PAGE_COUNT Specifies the total page count since ODS was opened.
TOTAL_PROC_COUNT Specifies the number of procedures that have run since ODS was opened.

ODS Statement Variables: Variables That Originate with the ODS Statement That Invoked the Tagset
Event Variable Description
AUTHOR Specifies the author of the output. The value of the AUTHOR event variable is set from an ODS statement, or, by default, is the user that is running SAS.
BASENAME Specifies the name of the BASE= option as set in an ODS statement.
BODY_NAME Specifies the name of the body file.
BODY_TITLE Specifies the title of the body file.
BODY_URL Specifies the URL of the body file.
CODE_NAME Specifies the name of the code file.
CODE_TITLE Specifies the title of the code file.
CODE_URL Specifies the URL of the code file.
CONTENTS_NAME Specifies the name of the contents file.
CONTENTS_TITLE Specifies the title of the contents file.
CONTENTS_URL Specifies the URL of the contents file.
DATA_NAME Specifies the name of the data file.
DATA_TITLE Specifies the title of the data file.
DATA_URL Specifies the URL of the data file.
ENCODING Specifies the encoding of the output for converting text data into a numbering system that computers recognize.
FRAME_NAME Specifies the name of the frame file.
FRAME_TITLE Specifies the title of the frame file.
FRAME_URL Specifies the URL of the frame file.
GRAPH_PATH_NAME Specifies the path of the graph as specified by the ODS PATH statement.
GRAPH_PATH_URL Specifies the URL of the graph.
NO_BOTTOM is non-zero if you specified the NO_BOTTOM_MATTER option on the ODS MARKUP statement.
NO_TOP is non-zero if you specified the NO_TOP_MATTER option on the ODS MARKUP statement.
OPERATOR Specifies the operator. The value of the OPERATOR event variable is set from an ODS statement or, by default, is the user that is running SAS.
PAGES_NAME Specifies the name of the pages file.
PAGES_TITLE Specifies the title of the pages file.
PAGES_URL Specifies the URL of the pages file.
PATH Specifies the path as set by an ODS statement.
PATH_NAME Specifies the path name.
PATH_URL Specifies the path location.
STYLESHEET_NAME Specifies the name of the stylesheet file.
STYLESHEET_TITLE Specifies the title of the stylesheet file.
STYLESHEET_URL Specifies the URL of the stylesheet file.
TAGSET Specifies the name of the current tagset.
TAGSET_ALIAS Specifies the alias of the current tagset as given in the ODS MARKUP statement.
TITLE Specifies the title from the ODS statement.
TRANTAB Specifies the translation table name for character conversions.

Table Variables
Event Variable Description
CLABEL Specifies the label for the output object in the contents file, the Results window, and the trace record. Set with the CONTENTS_LABEL= attribute in the table template. For information, see the CONTENTS_LABEL attribute.
COLCOUNT Specifies the number of columns in the current table.
COLEND_EA Specifies the ending column number.
COLSPAN Specifies the number of columns that the cell spans.
COLSTART Specifies the column number where the cell starts.
DATA_ROW Specifies that the current row is a data row.
IS_STACKED Specifies that the columns are stacked.
ROW Specifies the current table row, which includes headers.
ROWSPAN Specifies the number of rows that the current cell spans.
SECTION Specifies the header, body, or footer of the table.
WIDTH Specifies the width. WIDTH is most commonly used for COLSPECS.

URL Variables
Event Variable Description
NOBASE Sets a flag to determine whether to use the value for BASE= option as part of the URL. 0 uses the BASE= option, and 1 does not use BASE= option.
TARGET Specifies the target that is associated with the URL.
URL Specifies a fully formed URL.

Previous Page | Next Page | Top of Page