Enform Plus Reference Manual

Statements
Enform Plus Reference Manual422684-001
4-39
PARAM Statement
PARAM Statement
The PARAM statement allows you to name and define a parameter that can receive a
value from a TACL PARAM command. The syntax of the PARAM statement is:
param-name
is the name of the parameter being defined. The name must conform to the naming
conventions described under Rules for Naming User-Defined Elements on page 3-6.
internal-format
is the internal format for storing the parameter. Valid values for internal-format are:
The default is a 64-bit signed integer.
Up to 32 parameters can be defined per Enform Plus session. The SET statement can
initialize the value of the parameter. The following PARAM statement defines a
parameter named regno:
PARAM regno INTERNAL I2;
Values for parameters can be passed only to a running compiled query file. (A compiled
query file is created by the ?COMPILE command, as described under ?COMPILE
Command on page 6-7.) Before executing the stored compiled query file, a TACL
PARAM command can be used to pass a value for the parameter. The value specified by
the PARAM command supersedes the parameter value specified by a SET statement. The
PARAM command must precede the TACL ENFORM run command. See the Guardian
User's Guide for more information about the TACL PARAM command.
Parameter values can also be passed through the host-language interface. See the Enform
User's Guide for information about the host-language interface.
How Enform Plus Handles Parameters
Enform Plus handles a parameter syntactically as if it were a literal. Enform Plus
handles parameters declared with an alphanumeric internal format as string literals.
Enform Plus handles all other parameters as numeric literals. When you specify a
parameter as a target-item or as an item in a print-list, you must enclose the
parameter in parentheses just as you would an actual numeric literal. For example,
suppose rept, a compiled query file, contains the following Enform Plus statements:
PARAM { param-name [ INTERNAL internal-format ] } , ... [ ; ]
An alphanumeric, where n is the length.
In integer, where n is the length.
Fw.d fixed, where w is the number of digits, and d is the number of decimal
places.