Returns server metadata.
sp_mda parm1, parm2, parm3
parm1 is a required parameter that indicates the client type. There are three valid values: 0, 1, or 2.
0 – returns MDAVERSION and MDARELEASEID rows.
1 – returns all the currently defined metadata.
2 – returns metadata limited to the following rows:
MDAVERSION
CONNECTCONFIG
SET_CATALOG
GET_CATALOG
SET_AUTOCOMMIT_ON
SET_AUTOCOMMIT_OFF
SET_ISOLATION
SET_ROWCOUNT
OUTERJOINS
parm2 is a required parameter that indicates the client request for sp_mda version to be returned. This parameter is not currently used by SYOSPMDA, and the MDAVERSION metadata is actually returned as a result of parm1. The valid values for parm2 are 0 and 1.
parm3 is an optional parameter that indicates the client version. This parameter is not currently used by SYOSPMDA. The range of valid values is 0-9.
sp_mda consists of two programs: SYOSPMDA and SPMDACSP. SYOSPMDA establishes a server connection through the Server Option and reads the three parameters supplied with sp_mda. SPMDACSP determines if the user has chosen to use a DB2 table or a VSAM file as the means to store metadata attributes.
To execute sp_mda, initiate an isql session to your CICS region, and enter commands like the following:
exec sp_mda
parm1,parm2,parm3
go
The metadata returned consists of three columns:
MDINFO
QUERYTYPE
QUERY
The MDINFO column indicates the metadata attribute name.
The QUERYTYPE column indicates how the QUERY column should be treated. The range of valid values is as follows:
1 – Treat QUERY as RPC
2 – Treat QUERY as language command
3 – Treat QUERY as unsupported
4 – Treat QUERY as Boolean literal
5 – Treat QUERY as integer literal
6 – Treat QUERY as string literal
7 – Treat QUERY as integer list literal
The QUERY column is a 255-byte varchar field containing either:
A literal,
or
A query for execution at runtime to retrieve information. For queries that require parameters, a ? (question mark) is used to mark parameters.
The following example illustrates use and return values for sp_mda:
1>exec sp_mda 0,3
2>go
MDINFO |
QUERYTYPE |
QUERY |
---|---|---|
MDARELEASED |
6 |
|
MDAVERSION |
5 |
|
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |