set lines 200
set pages 3000

SET FEEDBACK   OFF
SET DEFINE   On
DEFINE schema = ''
COLUMN schema_val NOPRINT NEW_VALUE schema
SELECT '&&1' schema_val FROM dual;

DEFINE jobn = ''
COLUMN jobn_val NOPRINT NEW_VALUE jobn
SELECT '&&2' jobn_val FROM dual;

column owner format a15
column job_name format a30
column state format a9
column repeat_interval format a20
column JOB_CLASS format a30
column ELAP_MIN format 9999
column NEXT_RUN_DATE format a17
column run format 9999
column fail format 9999
column JOB_ACTION format a100


select owner,job_name,enabled,state,substr(repeat_interval,6,100) repeat_interval,JOB_CLASS,to_char(last_start_date,'dd/mm/yyyy hh24:mi:ss') last_start_date,JOB_ACTION
from dba_scheduler_jobs
where owner like upper('%&schema%')
and job_name like upper('%&jobn%')
order by JOB_CLASS,owner,job_name;

undefine &&1
undefine schema

undefine &&2
undefine jobn
