TEMPLATE Procedure: Creating Markup Language Tagsets

DEFINE EVENT Statement

Defines what is written to the output file.
Interaction: You can add event statement conditions to any DEFINE EVENT statement. For more information about event statement conditions, see Event Statement Conditions.
Using Different Styles for EventsModifying an Event to Include Other Style Sheets

Syntax

DEFINE EVENT event-name;
BLOCK event-name < / event-statement-condition(s)>;
BREAK </ event-statement-condition(s)>;
CLOSE </ event-statement-condition(s)>;
CONTINUE </ event-statement-condition(s)>;
DELSTREAM $$stream-variable-name </ event-statement-condition(s)>;
DO </ event-statement-condition(s)>;
ELSE </ event-statement-condition(s)>;
FLUSH </event-statement-condition(s)>;
ITERATE $dictionary-variable | $list-variable</ event-statement-condition(s)>;
NDENT </ event-statement-condition(s)>;
NEXT $dictionary-variable | $list-variable </ event-statement-condition(s)>;
OPEN $$stream-variable-name </ event-statement-condition(s)>;
PUT <function> <NL> <variable> <'text' > < / event-statement-condition(s)>;
PUTL (<variable> | <'text' >| <function> | <NL>) < / event-statement-condition(s)>;
PUTLOG (<variable> <'text' > <function>)</ event-statement-condition(s)>;
PUTQ (<variable> | <'text' >| <function> | <NL>)</ event-statement-condition(s)>;
PUTSTREAM $$stream-variable-name </ event-statement-condition(s)>;
PUTVARS variable-group variable-group-value< / event-statement-condition(s)>;
SET $<$>user-defined-variable-name user-defined-variable-value</ event-statement-condition(s)>;
STOP </ event-statement-condition(s)>;
TRIGGER event-name <START | FINISH> </ event-statement-condition(s)>;
UNBLOCK event-name </ event-statement-condition(s)>;
UNSET ALL | $memory-variable | $$stream-variable</ event-statement-condition(s)>;
XDENT </ event-statement-condition(s)>;
END;

Summary of Optional Arguments

Redirect event output to any of the known types of output that are open
Enable the event to use any style element that has been defined
Specify a style element

Required Argument

event-name
specifies the name of the event.

Event Attributes

FILE= BODY | CODE | CONTENTS | DATA | FRAME | PAGES | STYLESHEET;
redirects event output to any of the known types of output files that are open.
Restriction:The FILE= attribute is valid only in markup family destinations.
Interaction:The names of the output files correspond to the output filenames in the ODS MARKUP statement that are specified with the BODY=, CODE=, CONTENTS=, FRAME=, PAGES=, and STYLESHEET= options. For more information about these options, see the ODS MARKUP Statement.
See:The BODY= option in the ODS MARKUP Statement for a complete description of the FILE= attribute.
PURE_STYLE= YES | NO;
specifies whether to enable the event to use any of the style elements that have been defined.
YES
enables the event to use any of the style elements that have been defined.
Alias:ON
NO
does not enable the event to use any of the style elements that have been defined.
Alias:OFF
Default:NO
Restriction:The PURE_STYLE= attribute is valid only in markup family destinations.
STYLE= style-element;
specifies a style attribute that applies to a particular part of the output.
Restriction:The STYLE= attribute is valid only in markup family destinations.
Tip:When a carriage return separates style attributes, add a space before or after the carriage return to prevent syntax errors. SAS does not interpret a carriage return as a space.