TEMPLATE Procedure: Creating Markup Language Tagsets

Syntax

PROC TEMPLATE;
DEFINE TAGSET tagset-path </ STORE=libref.template-store >;
<tagset-attribute-1; <... tagset-attribute-n;>>
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;
END;

Table of Procedure Tasks

Statement Task Example
DEFINE TAGSET Statement Create a tagset Ex. 1, Ex. 2, Ex. 3, Ex. 4, Ex. 5, Ex. 8
DEFINE EVENT Statement Define what is written to the output file Ex. 1, Ex. 2, Ex. 3, Ex. 4, Ex. 5, Ex. 6, Ex. 7
BLOCK Statement Disable an event  
BREAK Statement Stop the current event from executing  
CLOSE Statement Close the current stream variable and direct all future output to the output file  
CONTINUE Statement Return the execution of the DO loop to the corresponding DO statement for re-evaluation of the IF event statement condition  
DELSTREAM Statement Delete the specified stream variable  
DO Statement Begin a statement block that executes if the required condition is true  
DONE Statement End a DO or ELSE statement block  
ELSE Statement Begin a statement block that executes if the corresponding DO statement is false  
Event Statement Conditions Specify one or more conditions that must be true for a DEFINE EVENT statement to execute  
Event Variables Set one or more event attributes  
END Statement End the event  
EVAL Statement Create or update a user-defined variable  
FLUSH Statement Write buffered output to the current output file or the current stream variable  
ITERATE Statement Iterate through a dictionary variable or list variable and assign its value to the _NAME_ and _VALUE_ event variables for each iteration  
NDENT Statement Indent output one more level than specified by the INDENT= attribute Ex. 3, Ex. 5
NEXT Statement Increase a dictionary or list variable incrementally to the next value and repopulate event variables  
NOTES Statement Provide information about the tagset Ex. 3
OPEN Statement Open or create a stream variable  
PUT Statement Write text, new lines, variable values, or DATA step function return values to an output file Ex. 1, Ex. 3, Ex. 4, Ex. 5, Ex. 6
PUTL Statement Write text, new lines, variable values, or DATA step function return values to an output file and add a new line to the end of the output  
PUTLOG Statement Write text, new lines, variable values, or DATA step function return values to the log  
PUTQ Statement Write text, new lines, variable values, or DATA step function return values to an output file and enclose in quotes Ex. 7
PUTSTREAM Statement Write the contents of the specified stream variable to an output file  
PUTVARS Statement Write text, new lines, variable values, or DATA step function return values to an output file for each value in a variable group, list, or dictionary  
SET Statement Create or update a user-defined variable and its value  
STOP Statement Move the execution to the end of the current statement block  
TRIGGER Statement Execute an event Ex. 3, Ex. 4, Ex. 5, Ex. 6
UNBLOCK Statement Enable a disabled event  
UNSET Statement Delete a user-defined variable and its value  
XDENT Statement Indent output one less indention level Ex. 3, Ex. 5