IBM Books

Administrative API Reference

sqlegdsc - Open DCS Directory Scan

Stores a copy in memory of the Database Connection Services directory entries, and returns the number of entries. This is a snapshot of the directory at the time the directory is opened.

The copy is not updated if the directory itself changes after a call to this API. Use sqlegdgt - Get DCS Directory Entries to retrieve the entries, and sqlegdcl - Close DCS Directory Scan to release the resources associated with calling this API.

Authorization

None

Required Connection

None

Version

sqlenv.h

C API Syntax



/* File: sqlenv.h */
/* API: Open DCS Directory Scan */
/* ... */
SQL_API_RC SQL_API_FN
  sqlegdsc (
    short * pNumEntries,
    struct sqlca * pSqlca);
/* ... */
 

Generic API Syntax



/* File: sqlenv.h */
/* API: Open DCS Directory Scan */
/* ... */
SQL_API_RC SQL_API_FN
  sqlggdsc (
    struct sqlca * pSqlca,
    short * pNumEntries);
/* ... */
 

API Parameters

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

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

REXX API Syntax



OPEN DCS DIRECTORY

Sample Programs

C
\sqllib\samples\c\dcscat.c

COBOL
\sqllib\samples\cobol\dcscat.cbl

FORTRAN
\sqllib\samples\fortran\dcscat.f

REXX
\sqllib\samples\rexx\dcscat.cmd

Usage Notes

The caller of the scan uses the returned value pNumEntries to allocate enough memory to receive the entries. If a scan call is received while a copy is already held, the previous copy is released, and a new copy is collected.

See Also

sqlegdcl - Close DCS Directory Scan

sqlegdge - Get DCS Directory Entry for Database

sqlegdgt - Get DCS Directory Entries.


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

[ DB2 List of Books | Search the DB2 Books ]