2. Writing Scripts and Procedures : Calling Procedures : How You Can Call Database Procedures
 
Share this page                  
How You Can Call Database Procedures
A database procedure is a data-oriented procedure stored in the database and executed within the database server that you can call by name in a script or 4GL procedure. Database procedures are often used to increase performance and help ensure data integrity and consistency.
In OpenROAD, you call database procedures the same way you call 4GL procedures.
The syntax for calling a database procedure is:
[integer_variable = ] callproc procedurename
               [(parameter = expression
               {, parameter = expression})]
procedurename
Specifies the name you specified when you created the database procedure and that you later provided when you registered the database procedure in OpenROAD Workbench.
In the following example, the callproc statement calls the database procedure named mydbprocedure:
callproc mydbprocedure;