Callable Procedures > DB2 Examples:
  
DB2 Examples:
1. DB2 example of a call from a Stored Procedure:
Add the following to the declaration section of the stored procedure:
DECLARE v_result VARCHAR(256);
Then add the call to the Procedure:
CALL [METABASE].Ws_Api_Glossary('Data Warehouse','Overview','A repository of business information'
,'ADD',v_result);
2. DB2 example of a call from the DB2 Command Line Processor (db2.exe):
Enter the following after connecting (the metadata is in a schema called QAD Data Warehouse Designer):
call Data Warehouse Designer.Ws_Api_Glossary('Data Warehouse','Overview','A repository of business information','ADD',?)
The following out is typical:
Value of output parameters
--------------------------
Parameter Name : P_RESULT
Parameter Value : Data Warehouse element inserted
 
Return Status = 0
3. DB2 example of a call from QAD SQL Admin (the metadata is in a schema called QAD Data Warehouse Designer):
{Call Data Warehouse Designer.Ws_Api_Glossary('Data Warehouse','Overview','A repository of business information','ADD',?)}
 
Ws_Connect_Replace
This procedure allows the caller to replace the contents of a connection from another connection.