home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: Product
/
Product.zip
/
DBDEMO.ZIP
/
DEMOFLS.ZIP
/
ARI.TXT
< prev
next >
Wrap
Text File
|
1991-07-01
|
1KB
|
45 lines
Application Remote Interface (ARI)
This program shows the performance impact of Application
Remote Interface (ARI), an OS/2 term for Remote Procedure
Call.
The median value is being found for the column C_ENDBAL
from table CHECKING. The module noari() uses the SQL
queries:
EXEC SQL SELECT COUNT(*)
INTO :num_rows
FROM BMCHUGH.CHECKING;
EXEC SQL DECLARE CBLOCK CURSOR FOR
SELECT C_ENDBAL FROM BMCHUGH.CHECKING
ORDER BY C_ENDBAL;
Then the cursor CBLOCK is used num_rows/2 times to FETCH
the desired median balance.
In the ARI version the module arir() uses the ari call:
sqleproc("aris.dll\\get_total", NULL, NULL, out_sqlda, &sqlca);
which in turn calls the remote function get_total(), stored
on the server in the DLL aris.dll which is in a subdirectory in
the LIBPATH of the server.
The get_total function carries out the necessary operations
mentioned above and returns the median balance in the data
structure out_sqlda. Since the operations are performed on
the server only one trip is made between the server and the
requester, with substantial savings in communication cost,
even over record blocking.
CONCEPTS:
Application Remote Interface, sqleproc, SQLDA for ARI, making
DLL's, memory allocation.