Callable Procedures > DB2 Examples:
  
DB2 Examples:
1. DB2 example of a call from a Stored Procedure:
Add the call to the procedure:
CALL [METABASE].WsWrkErrorBulk('I', p_job_name, p_task_name, p_sequence
, 'Message1~Message2~Message3~', NULL, NULL, p_job_id, p_task_id, NULL
, 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.WsWrkErrorBulk('I','Error Msg','Error',1,'Message1~Message2~Message3~',NULL,NULL,0,0,NULL,?)
The following out is typical:
Value of output parameters
--------------------------
Parameter Name : P_RESULT
Parameter Value : 1
 
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.WsWrkErrorBulk('I','Error Msg','Error',1,'Message1~Message2~Message3~',NULL,NULL,0,0,NULL,?)}
 
 
WsWrkTask
This procedure updates the counters stored against a task. These counters are visible in the views provided of the task and audit information. This procedure should only be called by a scheduled task, as it must have a valid job, task and sequence number which are provided by the scheduler.