htmSQL uses a defined set of processing rules to process
the information in the input file:
-
htmSQL sends all text and characters
that are not part of htmSQL (such as HTML tags and newline indicators)
to
stdout
exactly as they occur in the file.
If a variable reference appears in this text, htmSQL resolves the
reference before sending the text to
stdout
.
-
htmSQL collects the information
that is contained in the
SQL section and sends it to the SAS server as a complete SQL statement
to execute. Each variable reference that is in the SQL section is
resolved to the current value of the variable. htmSQL ignores newline
indicators in the SQL section.
-
For SQL queries, htmSQL retrieves
a row of the results set and writes it to
stdout
according to the information that is included in the
eachrow section. Variable references that correspond to column values are resolved.
htmSQL repeats this step for each row in the results set.
-
For SQL statements that perform
update functions, htmSQL processes the
success section if the return code is zero and the
error section if the return code is not equal to zero.