cObject
---Array
------cCLIHandler
---------cDB2Handler
The cDB2Handler class implements functionality specific to DB2.
Two methods are available to enumerate data sources. They can be used to present lists of available data sources in utilities. A procedure to show all available data sources with comments looks like:
Use DB2_DRV.pkg
Procedure ShowDB2DataSources
Handle hoDB2Handler
String sDataSourceAndComment
Get Create U_cDB2Handler To hoDB2Handler
If (hoDB2Handler > 0) Begin
Send SeedDataSources Of hoDB2Handler
Repeat
Get DataSources Of hoDB2Handler To sDataSourceAndComment
Showln sDataSourceAndComment
Until (sDataSourceAndComment = "")
Send Destroy Of hoDB2Handler
End
End_Procedure // ShowDB2DataSources