PL/SQL API jcs_event.event_file
Summary
This function returns the file name of the file that raised the event.
note
In the 'common scenario' (jobs submitted by a raised event) it is no longer necessary for the parameters to be runtime. If the functions are called from a job context they will obtain their information from the job wait event. If they are called outside of a job context they will take their information from the event itself. For the mentioned 'common scenario' the results are identical.
Example
An example of how to use the jcs_event functionscreate or replace event "TESTE1"
/
alter scheduler sch_db_1
add
raise "TESTE1"
on file '/tmp/tmp1*3.txt'
check 2
/
create or replace script "TESTS1"
( "FILE" in varchar2(255) null nodisplay noedit runtime
default jcs_event.event_file( 'TESTE1' )
, "COMMENT" in varchar2(255) null nodisplay noedit runtime
default jcs_event.event_comment( 'TESTE1' )
, "SCHEDULER" in varchar2(255) null nodisplay noedit runtime
default jcs_event.event_scheduler( 'TESTE1' )
)
event "TEST1" with clear
as begin
dbms_output.put_line('File : '||FILE);
dbms_output.put_line('Comment : '||COMMENT);
dbms_output.put_line('Scheduler: '||SCHEDULER);
end;
/
begin
jcs.submit('TESTS1');
commit;
end;
/
begin
jcs.wait(jcs.last_job_id, 60);
dbms_output.put_line(jcs.readfile(jcs.last_job_id, 1, 0));
dbms_output.put_line(jcs.readfile(jcs.last_job_id, 2, 0));
dbms_output.put_line(jcs.readfile(jcs.last_job_id, 3, 0));
end;
/
An example of how to use the jcs_event functions
Specification
function event_file(event_name in varchar2,
event_partition in varchar2 default null)
return varchar2
Parameters
- event_name - the event name
- event_partition - the event partition
- returns varchar2 -
plsqlTopic
onsiteTopic