Callable Procedures > Oracle Examples:
  
Oracle Examples:
1. Oracle example of a call from a Stored Procedure:
Add the following to the declaration section of the stored procedure:
v_result integer;
Then add the call to the procedure:
v_result := WsWrkAuditBulk('I', p_job_name, p_task_name, p_sequence
, 'Message1~Message2~Message3', NULL, NULL, p_job_id, p_task_id);
Perhaps add a check of the result:
IF ( v_result <> 1 ) THEN
p_status := v_result;
p_return_msg := 'Failed to write audit messages.';
END IF;
2. Oracle example of a call from sqlplus:
Note: The line beginning exec ... and end with ; must be one line.
Place the following code in a text file called FileName.sql:
set pages 0 feed off heading off
variable res number;
exec :res:=WsWrkAuditBulk('I','Audit Msg','Audit',1,'Message1~Message2~Message3',NULL,NULL,0,0);
print :res;
Execute the file from sqlplus (using @FileName). The following out is typical:
1