TEMPLATE Procedure: Creating Markup Language Tagsets

PUT Statement

Writes text, new lines, variable values, or DATA step function return values to an output file.
Creating a Tagset through Inheritance

Creating a New Tagset

Executing Events Using the TRIGGER= Statement

Indenting Output

Using Different Styles for Events

Syntax

Optional Arguments

NL
specifies a new line.
Aliases:CR

LF

text
specifies a string of text.
Requirement:text must be enclosed in quotation marks.
Interactions:The PUT statement pairs text strings with variables. A string of text that precedes a variable creates a string-value pair if the variable has a value. For example, for the following PUT statement, if the event variable ForeGround has a value of blue, then the output is color=blue:
put 'color=' foreground;

If the variable does not have a value, then the text is not written, and there is no output for the text or the variable. For example, for the following PUT statement, if the variables BackGround, ForeGround, and CellPadding do not have values, then the output is <table> followed by a new line:

put '<table' 'background=' background 'foreground=' foreground
     'cellpadding=' cellpadding '>' nl;

value
specifies any event variable, style variable, dynamic variable, user-defined variable, or DATA step function whose value you want to output.
Restriction:DATA step functions cannot be nested.
Requirement:User-defined variables must be preceded by a '$' or '$$' character.
Interactions:The PUT statement pairs text strings with variables. A string of text that precedes a variable creates a string-value pair, if the variable has a value. For example, for the following PUT statement, if the event variable ForeGround has a value of blue, then the output is color=blue:
put 'color=' foreground;

If the variable does not have a value, then the text is not written, and there is no output for the text or the variable. For example, for the following PUT statement, if the variables BackGround, ForeGround, and CellPadding do not have values, then the output is <table> followed by a new line:

put '<table' 'background=' background 'foreground=' foreground
     'cellpadding=' cellpadding '>' nl;

Tip:User-defined variables are not case sensitive.
See:For information about DATA step functions, see SAS Functions and CALL Routines: Reference.

For information about variables, see Understanding Variables.

Event Variables for a list of event variables

event-statement-condition(s)
specifies one or more conditions that must be true for the event statement to execute.
Requirement:event-statement-condition(s) must be preceded by a slash (/).
See: For information about these conditions, see Event Statement Conditions.