NameSearch Oracle SDK
NameSearch can be easily integrated into
Oracle applications. Included in the NameSearch software package
is a developer’s kit,
containing a collection of PL/SQL examples that illustrate its
integration into Oracle environment.
Oracle provides capabilities of calling external functions from PL/SQL
scripts. This is accomplished through the creation of extended stored procedures
that reference the dynamically executable function code. An external procedure
is a third-generation-language routine stored in a dynamic link library,
registered with PL/SQL, and invoked to do special-purpose processing. NameSearch
comes with such a library (shared object on UNIX/Linux platforms).
At run time, PL/SQL loads the library dynamically, and then calls
the routine as if it were a PL/SQL subprogram. To safeguard your database,
the routine runs in a separate address space.
STEPS TO CALL NameSearch FUNCTIONS FROM ORACLE:
Below is a set of examples demonstrating how to call
NameSearch’s “matcher” function
from Oracle scripts. All the other searching and comparison functions
of NameSearch can be called in a very similar manner.
1. Create alias library
Windows:
create library ist_lib as '<path>\istdll32.dll'
UNIX/Linux:
create library ist_lib as '<path>\ist.so'
2. Create a wrapper function:
Create or replace function pmatcher(serv in out char,
inname in out char,
oname in out char,
wstack in out char,
pstack in out char,
kcount in out char,
kstack in out char,
stable in out char)
return binary_integer as
external library ist_lib
name "MTmatcher"
language C;
3. Create an extended stored procedure that calls the function:
create or replace procedure tm (x char) as retvalue Binary_integer;
nin char(100) := 'xxxxx';
service char(8) := 'name1 ';
nout char(100) := 'xxxxx';
ws char(500) := 'xxxxx';
ps char(500) := 'xxxxx';
kc char(2) := 'xx';
ks char(500) := 'xxxxx';
st char(1000) := 'xxxxx';
begin
nin := ltrim(x);
retvalue := pmatcher(service,nin,nout,ws,ps,kc,ks,st);
dbms_output.put_line(retvalue);
dbms_output.put_line(nin);
dbms_output.put_line(nout);
end;
4. Execute the procedure (generate NameSearch keys)
execute tm('bob smith ');
NameSearch® General Information
|