17. System Commands for the Forms-based Tools : report Command--Run a Report : Passing Parameters on the Command Line : Passing Numeric Variables
 
Share this page                  
Passing Numeric Variables
Suppose your report specification contains the following code:
.declare deptno = integer
.query select firstname, lastname, deptid from employees
      where deptid = $deptno
To pass in a value for the numeric variable, $deptno, on the command line, enclose the variablename=value clause in parentheses ( ):
Windows and VMS:
report personnel emp (deptno=504)
UNIX:
report personnel emp "(deptno=504)"
Note for QUEL Users
Regardless of whether your report specification uses an SQL or a QUEL query, you pass values for numeric variables in the same way. Your report specification code would look like this for QUEL:
.declare deptno = integer
.query
range of e is emp
retrieve (e.firstname,e.lastname,e.deptid)
      where e.deptid = $deptno