TEMPLATE Procedure: Creating Markup Language Tagsets

PUTLOG Statement

Writes text, new lines, variable values, or DATA step function return values to the log.
Restriction: Unlike the other PUT statements, the PUTLOG statement does not specify new lines.

Syntax

Optional Arguments

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.
text
specifies a string of text.
Requirement:text must be enclosed in quotation marks.
Interactions:The PUTLOG 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 PUTLOG statement, if the event variable ForeGround has a value of blue, then the output that is written to the log is color=blue:
putlog '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 that is written to the log is <table>:

putlog '<table' 'background=' background 'foreground=' foreground
     'cellpadding=' cellpadding '>';

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 PUTLOG 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 PUTLOG statement, if the event variable ForeGround has a value of blue, then the output that is written to the log is color=blue:
putlog '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 PUTLOG statement, if the variables BackGround, ForeGround, and CellPadding do not have values, then the output that is written to the log is <table>:

putlog '<table' 'background=' background 'foreground=' foreground
     'cellpadding=' cellpadding '>';

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