| |
ISTwatch DB2 Integration
ISTwatch comes with DB2 Software Developer’s Kit that
includes a specialized library and examples of calling ISTwatch functions
from DB2 environment.
ISTwatch functions can be interfaced via DB2 stored procedures.
A stored procedure is a wrapper routine that references a function
stored in a dynamic link library, registered with DB2 and called
to do special-purpose processing. ISTwatch routines can be accessed
via its specialized DLL. At run time, DB2 SQL loads the library
dynamically, and then calls the routine as if it were a subprogram.
STEPS TO CALL ISTwatch FROM DB2:
1. Register the stored procedure (dynamic link library has to
be placed into SQLLIB\FUNCTIONS directory)
CREATE PROCEDURE db2TSearch(IN nameinput char(254), IN streetinput
char(254), IN cityinput char(254), IN countryinput char(254),
INOUT count char(2), INOUT results varchar(15000), IN max_results
char(2), IN ekeys_on char(1), IN alfa_comp2 char(1), IN rangetype
char(1), IN threshold char(3), IN searchtype char(2))
DYNAMIC RESULT SETS 0
LANGUAGE C
PARAMETER STYLE GENERAL
NO DBINFO
FENCED
NOT DETERMINISTIC
PROGRAM TYPE SUB
EXTERNAL NAME 'ISTWatchDB2xp!db2TSearch';
2. Execute ISTwatch main processing routine:
Example:
call db2TSearch('Osama bin Ladin', ' ', ' ', ' ', ' ', ' ', '6
', '1', '1', '0', '79 ', '86');
IST Watch General Information
|
|