Help me to change DBMS_JOB to DBMS_SCHEDULER

Hi,
Recently we moved to Oracle10G, in prevous version we used DBMS_JOB package for scheduling jobs. Now we want to use DBMS_SCHEDULER . can anybody help me please?
Below is my senario....
This proc. iam calling in my form Submit_button click..
PROCEDURE Job_Submit(P_Nav_Group IN VARCHAR2,
P_Nav_Process IN VARCHAR2,
P_Start_Time IN VARCHAR2,
P_Job IN OUT NUMBER ,
P_Cretour IN OUT VARCHAR2,
P_Nproc IN OUT VARCHAR2,
P_Message IN OUT VARCHAR2,
P_Cetat IN OUT VARCHAR2) IS
Cursor Cur_Nav_Process_Log Is Select Load_Log
From T_Nav_Process_Log
Where Nav_Process = P_Nav_Process;
Jobno NUMBER;
V_Proc VARCHAR2(100);
V_Interval VARCHAR2(100);
V_Hour NUMBER(4);
V_Min NUMBER(2);
V_Date1 DATE;
V_Numer NUMBER(6);
V_Deno NUMBER(6):= 1440; --(24*60)
V_Load_Log T_Nav_Process_Log.Load_Log%Type; --
BEGIN
COMMIT;
V_Hour := SUBSTR(P_Start_Time,1,2);
V_Min := SUBSTR(P_Start_Time,4,2);
V_Hour := V_Hour*60; -- To convert the hours into minutes
V_Numer:= V_Hour + V_Min; -- To get the total time minutes
V_Date1:= Trunc(SYSDATE) + (V_Numer/V_deno); -- To get the exact time for execution
Open Cur_Nav_Process_Log;
Fetch Cur_Nav_Process_Log Into V_Load_Log;
Close Cur_Nav_Process_Log;
IF V_Date1 < SYSDATE OR Upper(V_Load_Log) = 'Y' THEN
V_Date1:= Trunc(SYSDATE+1) + (V_Numer/V_deno);
END IF;
IF P_Nav_Process Like 'TR%' Or P_Nav_Process Like 'SB%' THEN
V_Proc := 'Nav_Compta_7.Trans_Dispatch
('''||P_Nav_Group||''','''||P_Nav_Process||''');';
V_Interval := 'Nav_Compta_7.Job_Interval ('''||P_Start_Time||''')';
Elsif P_Nav_Process Like 'TX%' THEN
V_Proc := 'Nav_Compta_7.Trans_CGT_Dispatch
('''||P_Nav_Group||''','''||P_Nav_Process||''');';
V_Interval := 'Nav_Compta_7.Job_Interval('''||P_Start_Time||''')';
END IF;
If V_Proc is Not Null then
Dbms_Job.Submit(Jobno ,V_Proc, V_Date1 ,V_Interval);
End If;
COMMIT;
EXCEPTION
When Others Then
P_Cretour := '7';
P_Nproc := 'Job_Submit';
P_Message := P_Message||' - NAV Group '||P_Nav_Group||' Job '||Jobno;
Infos.Format_Message(P_Nproc, P_Message, Sqlerrm(Sqlcode));
END Job_Submit;
2)This function will return next intervel...
FUNCTION Job_Interval(P_Start_Time IN VARCHAR2) RETURN DATE AS
V_Hour NUMBER(4);
V_Min NUMBER(2);
V_Date1 DATE;
V_Numer NUMBER(6);
V_Deno NUMBER(6):= 1440; --(24 hours *60 minutes)
V_Cretour VARCHAR2(30) := '0';
V_Nproc VARCHAR2(100);
V_Message VARCHAR2(2000);
V_Cetat VARCHAR2(30);
BEGIN
V_Hour := SUBSTR(P_Start_Time,1,2); -- To separate the hours from the string
V_Min := SUBSTR(P_Start_Time,4,2); -- To separate the minutes from the string
V_Hour := V_Hour*60; -- To convert the hours into minutes
V_Numer:= V_Hour + V_Min; -- To get the total time minutes
V_Date1:= Trunc(SYSDATE + 1) + (V_Numer/V_deno); -- To get the exact time for execution
RETURN (v_Date1);
END Job_Interval;
Regards
Mallikarjun

duplicate thread -> Re: Help me to change DBMS_JOB to DBMS_SCHEDULER

Similar Messages

  • Need help On Triggers/Change pointers in SAP

    Hi Experts,
    I Need help On Triggers/Change pointers in SAP.
    I have a requirement  as soon as an entry is created in one of the  Standard SAP  table it should check against my Ztable and update and create the corresponding entry in another Ztable.
    Can some one help me out on this with the syntax and how to do it

    Hi,
    Check whether you have any enhancement option (BADI, user exit, Customer enhancement etc) in the program which is used to save the data in the SAP standard table. If so, then try to write your code in that appropriate enhancement.

  • HT5622 I want to change my security information so I went to "Manage your Apple ID" but I could not find "Reset your security information" can someone help me to change my security answers. Thanks in advance

    Hello Everyone,
    I want to change my security information so I went to "Manage your Apple ID" but I could not find "Reset your security information" can someone help me to change my security answers.
    Thanks in advance

    call 1-800-275-2273 (1-800-MY-APPLE)

  • Please, can I with help of Javascript change spot color values? for example by my color VARNISH with c:0,m:10,y:15,k:0 to make change to c:0,m:0,y:0,k:0? thank you

    Please, can I with help of Javascript change specific spot color values? for example, I have color named VARNISH with values c:0,m:10,y:15,k:0 and it would help me to make change to c:0,m:0,y:0,k:0 as a part of an action. Is it possible? Thank you

    Hi Kon Verter,
    you can change the values of your spot swatch, but you have to check many things before.
    e.g. you can do something like this:
    var Vcolor = app.activeDocument.swatches.getByName("Varnish");
    if (Vcolor.color.spot.colorType == ColorModel.SPOT && Vcolor.color.spot.spotKind == SpotColorKind.SPOTCMYK) {
        alert("Black value before: "+Vcolor.color.spot.color.black);
        Vcolor.color.spot.color.black= 0; // and so on
        alert("Black value after: "+Vcolor.color.spot.color.black);
    This will change the black value of the cmyk spot color with name Varnish to 0
    Have fun

  • My calender is in unknown language pls help how to change back to normal language?

    my calender is in unknown language pls help how to change back to normal language?

    I do not know this tool can you be specific, just curious.
    T the Op the easiest way of reseting your preferences is the hold the command option shift keys down as Illustrator launches you have to click on the Illustrator icon and quickly hold these keys down.
    Oh yes on the PCit is control alt shift.

  • I Need help. I Change My Number and now imessage don t work.

    I Need help. I Change My Number and now imessage don t work.

    Hi Ivonka88,
    Here are some steps to try troubleshooting your issue with, depending on your specific symptoms:
    iOS: Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/ts4268
    iOS: Troubleshooting Messages
    http://support.apple.com/kb/ts2755
    Cheers!
    - Ari

  • Help menu options change all the time - repair install always shows

    After installing Acrobat X, I noticed the Help menu options change all the time.  The repair install option is always present and sometimes the deactivate option is present but grreyed-out, somtimes it is enabled and most of the time it doesn't even show up.  I have the full version purchased from a major online retailer.

    I should add the following: The Sound control panel will not even let me click on the "Show volume in Menu Bar" check box.
    I just now installed the latest Brother control panel (Leopard compatible) and it DOES appear in the menu bar.

  • Can anyone help me with changing email address for resetting password notification

    Can anyone help me with changing email address for resetting password notification?

    If you know the answers to your security questions, you can change your rescue email address as shown in step 6 in this article: http://support.apple.com/kb/HT5312.
    If you don't kow the answers to your security questions or need other assistance doing this, either contact Apple for assistance by going to https://expresslane.apple.com, then click More Products and Services>Apple ID>Other Apple ID Topics>Lost or forgotten Apple ID password, or contact the Apple account security team: http://support.apple.com/kb/HT5699.

  • Help i accidentally change my font size on my phone, now it is huge, apps and everything

    help i accidentally change my font size on my phone, now it is huge, apps and everything

    Try Settings>General>Accessibility>Large Text>select the font size you want. I may also be that you have inadvertently turned on Zoom, try double tapping the screen with three fingers to decrease zoom then go into Settings>General>Accessibility>Zoom>OFF. I would also consider turning off Triple Click Home in Settings>General>Accessibility>Triple-click Home>OFF as this may have enabled zoom inadvertently.

  • Please help me to change the password policy in Sun Directory Server 6.0

    Hi,
    Please help me to change the password policy in Sun Directory Server 6.0

    What are you trying to accomplish? Have you at least read the manual?
    http://docs.oracle.com/cd/E19693-01/819-0995/fhkrj/index.html
    As reported in earlier threads on this forum, DSEE 6.0 IS NOT a release you should use in your production environment, specially if you're starting new projects; consider moving at least to the latest 6.x release which is 6.3.1.1.1
    thanks,
    Marco

  • Please help me to change the language from Danish to swedish i PS CS5

    please help me to change the language from Danish to swedish i PS CS5
    In the program (interfaces) i can only choose Danish

    There is nothing to choose. The language is determined by your serial number and the choice of language during installation. You need to reinstall in that language.
    Mylenium

  • Can anyone help me to change the file to version 8.6 ??

    can anyone help me to change the file to version 8.6 ??
    Attachments:
    Hydrostatic_Test.vi ‏2362 KB

    Duplicate Post.
    http://forums.ni.com/ni/board/message?board.id=170&thread.id=465548
    Tim
    Johnson Controls
    Holland Michigan

  • HT5622 I need help trying to figure out why I'm not able to purchase anythi iTunes. I changed my password, that didn't help. I changed my payment type, that didn't help. It initially started when my password got disabled. Any advice?

    I need help trying to figure out why I'm not able to purchase anything on iTunes. I changed my password, that didn't help. I changed my payment type, that didn't help. It initially started when my password got disabled. Any advice?

    I need help trying to figure out why I'm not able to purchase anything on iTunes. I changed my password, that didn't help. I changed my payment type, that didn't help. It initially started when my password got disabled. Any advice?

  • HT5787 can you help me with change the security question

    can you help me with change the security question

    If you have a rescue email address (which is not the same thing as an alternate email address) set up on your account then the steps half-way down this page give you a reset link on your account : http://support.apple.com/kb/HT5312
    If you don't have a rescue email address (you won't be able to add one until you can answer your questions) then you will need to contact iTunes Support / Apple in your country to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset (and if you don't already have a rescue email address) you can then use the steps half-way down the HT5312 link above to add a rescue email address for potential future use

  • Help me for change security questions

    plz apple help me for change security questions

    Contact Apple Support to have your security questions reset:
    ACCOUNT SECURITY CONTACT NUMBERS
    Cheers,
    GB

Maybe you are looking for

  • Summary of  a table in SQL

    I need a query to print summary of table in a single query without using PLSQL.. table list with t as select 1 table_number , 't1' table_name from dual union all select 2 table_number , 't2' table_name from dual union all select 2 table_number , 't3'

  • Upgrading my old imac to OSX from OS 9.2.2 from an external cd drive

    Hi there I dusted off my old imac for my son to use which was I think bought around 2000 its blue with a cd load tray. I know its got OS 9.2.2.2 currently. I wanted to upgrade the system to OSX 10.4 from a tiger disk. Unfortunately the cd drive isnt

  • FF thinks PDF files are binary files, doesn't give me the option to open them

    I just got a new Mac, running OSX 10.7 Lion. I downloaded Firefox because I like it better than Safari. It's Firefox 7.0.1. Aside from the fact that I can't figure out how to get all my bookmarks from the old mac to the new one, a really annoying thi

  • It sounds SO SIMPLE but i'm STILL having trouble with this!!

    Well after tinkering with Java for three years i thought i was pretty comfortable with it but lo and behold i am completely stuck on the SIMPLEST problem: The good ole classpath. I've always run javac from the dir that has my .java files and never ne

  • Where is "save as" or how to change file type in Preview in Lion?

    Where is "save as" or how to change file type in Preview in Lion? I used to use Preview to change quickly change a lot of PNGs to either JPEGs or PDFs but with the introduction of versions auto save etc there no "save as" in the File menu. Any sugges