Command Reference

CALL

Invokes a stored procedure defined in the catalog.

Authorization

The authorization rules vary according to the server where the procedure is stored.

DB2 Universal Database:

The privileges held by the authorization ID of the CALL statement at run time statement must include at least one of the following:

DB2 Universal Database for OS/390:

The privileges held by the authorization ID of the CALL statement at bind time must include at least one of the following:

DB2 for AS/400:

The privileges held by the authorization ID of the CALL statement at bind time must include at least one of the following:

Required Connection

Database

Command Syntax

                      .-,---------------.
                      V                 |
>>-CALL--proc-name-------+-----------+--+----------------------><
                         '-argument--'
 

Command Parameters

proc-name
Identifies the stored procedure to be called. This can be the name of the procedure to run or the fully qualified schema name. For example, user "newton" creates a stored procedure named "getMedian" and issues the command CALL getMedian. Then, user "dbuser1" creates a stored procedure that is also called "getMedian". If "newton" reissues CALL getMedian, it will fail because the procedure name exists in multiple schemas (NEWTON and DBUSER1). In order for the command to work, "newton" needs to issue CALL NEWTON.getMedian.

argument
Specifies one or more arguments for the stored procedure.


[ Top of Page | Previous Page | Next Page ]