TEMPLATE Procedure: Creating Markup Language Tagsets

OPEN Statement

Opens or creates a stream variable. When the PUT statements occur after the OPEN statement, all text or variable data that is specified by PUT statements is appended to the stream variable instead of the output file.
Interaction: An open stream variable is closed when a new stream variable is opened.

Syntax

Required Argument

stream–variable
specifies a stream variable, which is a temporary item store that contains output.
Tips:User-defined variables are not case sensitive.

If you assign the name of a memory variable to stream-variable, then the stream variable resolves as the value of the memory variable. For example, the following program uses the memory variable $MyStream as a stream variable:

set $mystream 'test';
 open $mystream;
 put 'The memory variable $mystream is being used as a stream variable';
 close;
Therefore, the following statements are equivalent:
put $$test;
 putstream $mystream;
 putstream test;
The following statements are also equivalent:
unset $$test;
 delstream $mystream;
 delstream test;
See memory variables.

Optional Argument

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 conditionsEvent Statement Conditions.