IBM Books

Administrative API Reference

sqlenops - Open Node Directory Scan

Stores a copy in memory of the node directory, and returns the number of entries. This is a snapshot of the directory at the time the directory is opened. This copy is not updated, even if the directory itself is changed later.

Use sqlengne - Get Next Node Directory Entry to advance through the node directory and examine information about the node entries. Close the scan using sqlencls - Close Node Directory Scan. This removes the copy of the directory from memory.

Authorization

None

Required Connection

None

Version

sqlenv.h

C API Syntax



/* File: sqlenv.h */
/* API: Open Node Directory Scan */
/* ... */
SQL_API_RC SQL_API_FN
  sqlenops (
    unsigned short * pHandle,
    unsigned short * pNumEntries,
    struct sqlca * pSqlca);
/* ... */
 

Generic API Syntax



/* File: sqlenv.h */
/* API: Open Node Directory Scan */
/* ... */
SQL_API_RC SQL_API_FN
  sqlgnops (
    unsigned short * pHandle,
    unsigned short * pNumEntries,
    struct sqlca * pSqlca);
/* ... */
 

API Parameters

pHandle
Output. Identifier returned from this API. This identifier must be passed to sqlengne - Get Next Node Directory Entry, and sqlencls - Close Node Directory Scan.

pNumEntries
Output. Address of a 2-byte area to which the number of directory entries is returned.

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

REXX API Syntax



OPEN NODE DIRECTORY USING :value 

REXX API Parameters

value
A compound REXX variable to which node directory information is returned. In the following, XXX represents the host variable name.

XXX.0
Number of elements in the variable (always 2)

XXX.1
Specifies a REXX host variable containing a number for scanid

XXX.2
The number of entries contained within the directory.

Sample Programs

C
\sqllib\samples\c\nodecat.c

COBOL
\sqllib\samples\cobol\nodecat.cbl

FORTRAN
\sqllib\samples\fortran\nodecat.f

REXX
\sqllib\samples\rexx\nodecat.cmd

Usage Notes

Storage allocated by this API is freed by calling sqlencls - Close Node Directory Scan.

Multiple node directory scans can be issued against the node directory. However, the results may not be the same. The directory may change between openings.

There can be a maximum of eight node directory scans per process.

See Also

sqlencls - Close Node Directory Scan

sqlengne - Get Next Node Directory Entry.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]