IBM Books

Administrative API Reference

sqlegdgt - Get DCS Directory Entries

Transfers a copy of Database Connection Services (DCS) directory entries to a buffer supplied by the application.

Authorization

None

Required Connection

None

Version

sqlenv.h

C API Syntax



/* File: sqlenv.h */
/* API: Get DCS Directory Entries */
/* ... */
SQL_API_RC SQL_API_FN
  sqlegdgt (
    short * pNumEntries,
    struct sql_dir_entry * pDCSDirEntries,
    struct sqlca * pSqlca);
/* ... */
 

Generic API Syntax



/* File: sqlenv.h */
/* API: Get DCS Directory Entries */
/* ... */
SQL_API_RC SQL_API_FN
  sqlggdgt (
    struct sqlca * pSqlca,
    short * pNumEntries,
    struct sql_dir_entry * pDCSDirEntries);
/* ... */
 

API Parameters

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

pNumEntries
Input/Output. Pointer to a short integer representing the number of entries to be copied to the caller's buffer. The number of entries actually copied is returned.

pDCSDirEntries
Output. Pointer to a buffer where the collected DCS directory entries will be held upon return of the API call. For more information about this structure, see SQL-DIR-ENTRY. The buffer must be large enough to hold the number of entries specified in the pNumEntries parameter.

REXX API Syntax



GET DCS DIRECTORY ENTRY [USING :value] 

REXX API Parameters

value
A compound REXX host variable into which the directory entry information is returned. In the following, XXX represents the host variable name. If no name is given, the name SQLGWINF is used.

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

XXX.1
RELEASE

XXX.2
LDB

XXX.3
TDB

XXX.4
AR

XXX.5
PARMS

XXX.6
COMMENT

XXX.7
RESERVED.

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

sqlegdsc - Open DCS Directory Scan, which returns the entry count, must be called prior to issuing GET DCS DIRECTORY ENTRIES.

If all entries are copied to the caller, the Database Connection Services directory scan is automatically closed, and all resources are released.

If entries remain, subsequent calls to this API should be made, or CLOSE DCS DIRECTORY SCAN should be called, to release system resources.

See Also

sqlegdcl - Close DCS Directory Scan

sqlegdge - Get DCS Directory Entry for Database

sqlegdsc - Open DCS Directory Scan.


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

[ DB2 List of Books | Search the DB2 Books ]