## zowe › db2 › call › procedure

Call a Db2 stored procedure. Specify the stored procedure name and optionally provide values.

#### Usage

zowe db2 call procedure <routine> [options]

#### Positional Arguments

- `routine` (string)

  - The name of a Db2 stored procedure

#### Options

- `--parameters` | `-p` (array)

  - Values to bind to the stored procedure parameters

#### DB2 Connection Options

- `--host` | `-H` (string)

  - The Db2 server host name

- `--port` | `-P` (number)

  - The Db2 server port number

- `--user` | `-u` (string)

  - The Db2 user ID (may be the same as the TSO login)

- `--password` | `--pass` | `--pw` (string)

  - The Db2 password (may be the same as the TSO password)

- `--database` | `--db` (string)

  - The name of the database

- `--sslFile` | `--ssl` (string)

  - Path to an SSL Certificate file

#### Profile Options

- `--db2-profile` | `--db2-p` (string)

  - The name of a (db2) profile to load for this command execution.

- `--base-profile` | `--base-p` (string)

  - The name of a (base) profile to load for this command execution.

#### Base Connection Options

- `--reject-unauthorized` | `--ru` (boolean)

  - Reject self-signed certificates.

    Default value: true

- `--token-type` | `--tt` (string)

  - The type of token to get and use for the API. Omit this option to use the default token type, which is provided by 'zowe auth login'.

- `--token-value` | `--tv` (string)

  - The value of the token to pass to the API.

- `--cert-file` (local file path)

  - The file path to a certificate file to use for authentication.

    Note: The CLI does not support certificate files that require a password. For more information, search Troubleshooting PEM Certificates in Zowe Docs.

- `--cert-key-file` (local file path)

  - The file path to a certificate key file to use for authentication

#### Examples

- Call stored procedure DEMO.SP1:

  - `zowe db2 call procedure "DEMO.SP1"`

- Call a stored procedure and pass values for parameter indicators:

  - `zowe db2 call procedure "DEMO.SP2(?, ?)" --parameters "Hello" "world!"`

- Call a stored procedure and pass values for two output parameters. The first output requires a 2-character buffer. The second output is a message that will be truncated to the length of the placeholder.:

  - `zowe db2 call procedure "DEMO.SP3(NULL, ?, ?)" --parameters "00" "message_placeholder_message_placeholder"`