Callable Procedures > DB2 Examples:
  
DB2 Examples:
1. DB2 example of a call from a Stored Procedure:
Add the call to the procedure:
CALL [METABASE].WsWrkAuditBulk('I', p_job_name, p_task_name, p_sequence
, 'Message1~Message2~Message3~', NULL, NULL, p_job_id, p_task_id, 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.WsWrkAuditBulk('I','Audit Msg','Audit',1,'Message1~Message2~Message3~',NULL,NULL,0,0,?)
The following out is typical:
Return Status = 1
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.WsWrkAuditBulk('I','Audit Msg','Audit',1,'Message1~Message2~Message3~',NULL,NULL,0,0,?)}
 
WsWrkError
This procedure writes a row to the error log ws_wrk_error_log. It is called by procedures wishing to log either detailed or error information.