Command Reference
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:
- Execute privilege for the package associated with the stored
procedure
- Control privilege for the package associated with the stored
procedure
- sysadm or dbadm authority
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:
- Execute privilege for the package associated with the stored
procedure
- Ownership of the package associated with the stored procedure
- Packadm authority for the package's collection
Sysadm authority
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:
- If the stored procedure is written in REXX:
- The system authorities *OBJOPR and *READ on the source file associated
with the procedure
- The system authority *EXECUTE on the library containing the source file
and the system authority *USE to the CL command
- If the stored procedure is not written in REXX:
- The system authority *EXECUTE on both the program associated with the
procedure and on the library containing that program Administrative authority
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 ]