Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Setting program/job arguments

colesgaJul 30 2008 — edited Jul 31 2008

Hi

I have a dbms_scheduler job that runs a SP, this SP requires 2 parameters passing to it (p_from_date and p_to_date). I have set my argument as below.

dbms_scheduler.define_program_argument	
( program_name => 'PGM_PROCESS_EXCEPTIONS'
, argument_name => 'p_from_date'
, argument_position => 1
, argument_type => 'DATE'
, default_value => sysdate - 30
);
dbms_scheduler.define_program_argument
( program_name => 'PGM_PROCESS_EXCEPTIONS'
, argument_name => 'p_to_date'
, argument_position => 2
, argument_type => 'DATE'
, default_value => sysdate
);

My problem is that the default values are set to the dates when i compile this on the DB. How can i set these parameters as running parameters, as in the dates are set at the time of the job running?

Can this be done using SET_JOB_ARGUMENT_VALUE?

Cheers
Gary

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 28 2008
Added on Jul 30 2008
2 comments
2,167 views