Appendix D. DB2 Cube Views stored procedure API 677
The stored procedure interface
򐂰 The DB2 Cube Views stored procedure is called md_message and it
processes parameters expressed in the DB2 Cube Views parameter format.
The procedure extracts operation and metadata information from the input
parameters, and then it performs the requested metadata operations. The
procedure generates output parameters that contain the execution status
(success or failure) of requested operations, in addition to containing
metadata information, depending on the operation.
򐂰 The DB2 Cube Views stored procedure is implemented as a DB2 stored
procedure. It can be used by any application that makes use of any of DB2’s
programming interfaces. The name of the stored procedure is case
insensitive, while the name and contents of the stored procedure’s
parameters are case sensitive.
򐂰 The parameter format defines the standard by which metadata operations
and objects are represented and exchanged between BI applications and
DB2 Cube Views. The parameter format uses XML to represent DB2 Cube
Views metadata operations and objects. This XML format directly maps to the
metadata object model by capturing associations between objects. It also
delivers relational database information in an OLAP context such that SQL
statements for OLAP data can be formed
The syntax of md_message and a prototype are shown in Figure D-3.
Figure D-3 Syntax of md_message stored procedure
Syntax:
call md_message (request, metadata, response)
Prototype:
md_message (request IN CLOB(1M),
metadata INOUT CLOB(1M),
response OUT CLOB(1M))
Remarks:
- Request and response parameters are mandatory
- Metadata parameter is optional
- XML parameters exchanged using Character Large Object (CLOB) structures
- "CALL" SQL statement invokes the stored procedure

Get DB2 Cube Views: A Primer now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.