DID module

In the DID module, you define the following attributes:

  • Name

    Sets the name of the DID module. This is the name used in the DID document to refer to this DID module. The name must begin with an uppercase character and can be followed by lowercase characters, uppercase characters, digits, or underscores.

    did-module-name ::=
    uppercase-itp-name 
    |	quoted-string

  • Connection type

    You can create a DID that connects to different database management systems. KCM supports the following connection types: LOCAL, AS400, ODBC, ORACLE, XMLFILE, XMLWEB, XML MQSeries, and MAINFRAME.

    connection-type-name ::=
    AS400
    |	LOCAL
    |	MAINFRAME
    |	ORACLE
    |	ODBC
    |	XMLFILE
    |	XMLWEB
    |	MQXML

    For information on the connection types, see Configure connection types. Also, you can use DID Wizards to create entries for some connection types (see Generate an ODBC or Oracle entry and Generate an ODBC stored procedure entry).

    All entries and functions defined in a DID module use the same connection type. You cannot define an entry for various connections in the same DID module.

  • Code page

    Sets the default code page for all entries in the DID module. In an entry definition, you can overwrite the code page for an individual entry.

    codepage ::=
    EBCDIC
    |	ASCII
    |	natural-number

  • Namespace mappings

    A DID module can specify mappings for XML namespaces. These mappings are applied when data is retrieved from an XML data source.

    namespace-list
    namespace-list ::=
    namespace-entry [ namespace-list ] 

  • Entry definitions

    A DID module can contain one or more entry definitions. You need to declare which entries can be used as main entries within the DID definition.

  • Function definitions

    A DID module can contain one or more function definitions. You need to declare it within the DID definition before it can be used in a Master Template.

  • Alias entries

    You can declare aliases for entries. You can use these aliases as subentries in the DID module. You cannot declare an alias as a main entry.

  • Import entries

    You can import entries from other DID modules as subentries. You cannot declare an import to be a main entry, but you can make aliases for an imported entry.

Syntax

did-module-definition ::=
DEFINE_DIDMODULE
NAME did-module-name 
CONNECTION connection-type-name  
[ did-module-attribute-sequence ]
[ entry-and-func-definition-sequence ]
END_DEFINE_DIDMODULE
did-module-attribute-sequence ::=
did-module-attribute [ did-module-attribute-sequence ]
did-module-attribute ::=
did-module-codepage
|	did-module-namespaces
did-module-codepage ::=
CODEPAGE codepage 
did-module-namespaces ::=
NAMESPACE namespace-list
namespace-list ::=
namespace-entry [ namespace-list ]
namespace-entry ::=
"prefix" = "URI"
entry-and-func-definition-sequence ::=
entry-and-func-definition [ entry-and-func-definition-sequence ]
entry-and-func-definition ::=
entry-definition  
|	did-defined-function-definition
|	alias-definition  
|	import-definition  

Example

DEFINE_DIDMODULE
	NAME Example_module
	CONNECTION_TYPE XMLFILE
NAMESPACE
  ""      = "http://example.com//ns//default" (* Default namespace *)
  "xhtml" = "http://www.w3.org//2017//xhtml"  (* xhtml: prefix *)

	(* ...
	Entry and function definitions are placed here
	... *)
END_DEFINE_DIDMODULE