Callable Procedures > DB2 Examples:
  
DB2 Examples:
1. DB2 example of a call from a Stored Procedure:
Add the call to the procedure:
CALL [METABASE].WsWrkError('I', p_job_name, p_task_name, p_sequence
, 'This is a Message', NULL, NULL, p_task_id, p_job_id, NULL);
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.WsWrkError('I','Error Msg','Error',1,'This is a Message.',NULL,NULL,0,0,NULL)
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.WsWrkError('I','Error Msg','Error',1,'This is a Message.',NULL,NULL,0,0,NULL)}
 
WsWrkErrorBulk
This procedure writes a number of message rows to the error log ws_wrk_error_log. It is called by procedures wishing to log either detailed or error information.