Administrative API Reference

sqlectnd - Catalog Node

Stores information in the node directory about the location of a DB2 server instance based on the communications protocol used to access that instance. The information is needed to establish a database connection or attachment between an application and a server instance.

Authorization

One of the following:

Required Connection

None

Version

sqlenv.h

C API Syntax



/* File: sqlenv.h */
/* API: Catalog Node */
/* ... */
SQL_API_RC SQL_API_FN
  sqlectnd (
    struct sqle_node_struct * pNodeInfo,
    void * pProtocolInfo,
    struct sqlca * pSqlca);
/* ... */
 

Generic API Syntax



/* File: sqlenv.h */
/* API: Catalog Node */
/* ... */
SQL_API_RC SQL_API_FN
  sqlgctnd (
    struct sqlca * pSqlca,
    struct sqle_node_struct * pNodeInfo,
    void * pProtocolInfo);
/* ... */
 

API Parameters

pNodeInfo
Input. A pointer to a node directory structure. For more information about this structure, see SQLE-NODE-STRUCT.

pProtocolInfo
Input. A pointer to the protocol structure. For more information about these structures, see:

pSqlca
Output. A pointer to the sqlca structure. For more information about this structure, see SQLCA.

REXX API Syntax



CATALOG APPC NODE nodename DESTINATION symbolic_destination_name
[SECURITY {NONE|SAME|PROGRAM}]
[WITH comment]

REXX API Parameters

nodename
Alias for the node to be cataloged.

symbolic_destination_name
Symbolic destination name of the remote partner node.

comment
An optional description associated with this node directory entry. Do not include a CR/LF character in a comment. Maximum length is 30 characters. The comment text must be enclosed by double quotation marks.

REXX API Syntax



CATALOG IPXSPX NODE nodename REMOTE file_server SERVER objectname
[WITH comment]

REXX API Parameters

nodename
Alias for the node to be cataloged.

file_server
Name of the NetWare file server where the internetwork address of the database manager instance is registered. The internetwork address is stored in the bindery at the NetWare file server, and is accessed using objectname.

objectname
The database manager server instance is represented as the object, objectname, on the NetWare file server. The server's IPX/SPX internetwork address is stored and retrieved from this object.

comment
An optional description associated with this node directory entry. Do not include a CR/LF character in a comment. Maximum length is 30 characters. The comment text must be enclosed by double quotation marks.

REXX API Syntax



CATALOG LOCAL NODE nodename INSTANCE instance_name [WITH comment]

REXX API Parameters

nodename
Alias for the node to be cataloged.

instance_name
Name of the instance to be cataloged.

comment
An optional description associated with this node directory entry. Do not include a CR/LF character in a comment. Maximum length is 30 characters. The comment text must be enclosed by double quotation marks.

REXX API Syntax



CATALOG NETBIOS NODE nodename REMOTE server_nname ADAPTER adapternum
[WITH comment]

REXX API Parameters

nodename
Alias for the node to be cataloged.

server_nname
Name of the remote workstation. This is the workstation name (nname) found in the database manager configuration file of the server instance.

adapternum
Local LAN adapter number.

comment
An optional description associated with this node directory entry. Do not include a CR/LF character in a comment. Maximum length is 30 characters. The comment text must be enclosed by double quotation marks.

REXX API Syntax



CATALOG NPIPE NODE nodename REMOTE computer_name INSTANCE instance_name

REXX API Parameters

nodename
Alias for the node to be cataloged.

computer_name
The computer name of the node on which the target database resides.

instance_name
Name of the instance to be cataloged.

REXX API Syntax



CATALOG TCPIP NODE nodename REMOTE hostname SERVER servicename
[WITH comment]

REXX API Parameters

nodename
Alias for the node to be cataloged.

hostname
Host name of the node where the target database resides.

servicename
Either the service name of the database manager instance on the remote node, or the port number associated with that service name.

comment
An optional description associated with this node directory entry. Do not include a CR/LF character in a comment. Maximum length is 30 characters. The comment text must be enclosed by double quotation marks.

Sample Programs

C
\sqllib\samples\c\nodecat.c

COBOL
\sqllib\samples\cobol\nodecat.cbl

REXX
\sqllib\samples\rexx\nodecat.cmd

Usage Notes

DB2 creates the node directory on the first call to this API if the node directory does not exist. On OS/2 or the Windows operating system, the node directory is stored in the directory of the instance being used. On UNIX based systems, it is stored in the DB2 install directory (sqllib, for example).

If directory caching is enabled (see the configuration parameter dir_cache in sqlfxsys - Get Database Manager Configuration), database, node, and DCS directory files are cached in memory. An application's directory cache is created during its first directory lookup. Since the cache is only refreshed when the application modifies any of the directory files, directory changes made by other applications may not be effective until the application has restarted. To refresh DB2's shared cache (server only), stop (db2stop) and then restart (db2start) the database manager. To refresh the directory cache for another application, stop and then restart that application.

To list the contents of the node directory, use sqlenops - Open Node Directory Scan, sqlengne - Get Next Node Directory Entry, and sqlencls - Close Node Directory Scan.

See Also

sqlencls - Close Node Directory Scan

sqlengne - Get Next Node Directory Entry

sqlenops - Open Node Directory Scan

sqleuncn - Uncatalog Node.


[ Top of Page | Previous Page | Next Page ]