Passing Values to Input Parameters

To pass data values to input parameters within a stored procedure or query, use the PARAMS option of SQLEXEC.

Syntax

PARAMS ([OPTIONAL | REQUIRED] param = {source_column | function}
[, ...] )

Where:

  • OPTIONAL indicates that a parameter value is not required for the SQL to execute. If a required source column is missing from the database operation, or if a column-conversion function cannot complete successfully because a source column is missing, the SQL executes anyway.

  • REQUIRED indicates that a parameter value must be present. If the parameter value is not present, the SQL will not be executed.

  • param is one of the following:

    • For a stored procedure, it is the name of any parameter in the procedure that can accept input, such as a column in a lookup table.

    • For an Oracle query, it is the name of any input parameter in the query excluding the leading colon. For example, :param1 would be specified as param1 in the PARAMS clause.

    • For a non-Oracle query, it is pn, where n is the number of the parameter within the statement, starting from 1. For example, in a query with two parameters, the param entries are p1 and p2.

  • {source_column | function} is the column or Oracle GoldenGate conversion function that provides input to the procedure.