Example - Using Parameter Maps
This DB2® example
shows how a database administrator can obtain model information.
An application standard might be to define a parameter map that appears in all models. The parameter map defines context information about the IBM® Cognos® application. This approach requires that any application that uses the connection must provide this information to avoid errors.
<commandBlock>
<commands>
<sqlCommand>
<sql> CALL myproc(#sq($APP_INFO{APPNAME}) + ',' +
sq($APP_INFO{'APPMAJOR'}) + ',' +
sq($APP_INFO{'APPMINOR'}) + ',' +
sq($APP_INFO{'APPCONTACT'}) + ', ''Constant1'' '#))
</sql>
</sqlCommand>
</commands>
</commandBlock>
After the macro is expanded, the database administrator obtains the following information about the query:
CALL myproc('ApplicationName','10','1','TradingApp@email.com',
'Constant' )