PARAMETERS statement [DBISQL]

Description

Specifies parameters to a dbisql command file.

Syntax

PARAMETERS parameter1, parameter2, …

Examples

Example 1

This dbisql command file takes two parameters:

PARAMETERS department_id, file ;
SELECT Surname
FROM Employees
WHERE DepartmentID = {department_id}
>#{file}.dat;

Usage

PARAMETERS specifies how many parameters there are to a command file and also names those parameters so that they can be referenced later in the command file.

Parameters are referenced by putting into the file where you want the named parameter to be substituted.:

{parameter1}

There must be no spaces between the braces and the parameter name.

If a command file is invoked with fewer than the required number of parameters, dbisql prompts for values of the missing parameters.


Side effects

None

Standards

Permissions

None

See also

READ statement [DBISQL]