Package is working but not passing parameter it is passing default value

The problem now is that the argument (P_ATS_NO) is being pass as the default 0 instead of the number
I am passing in. Did I do something wrong with the argument?
I am using the following to call the package
declare
begin
MYTEST.A411APPROVALEMAIL_PKG.A411APPROVALEMAIL_async(:P_test);
end;
:P_test is being set to 1204 but I am getting 0
THE PACKAGE
create or replace PACKAGE BODY A411APPROVALEMAIL_PKG
AS
PROCEDURE A411APPROVALEMAIL_async (P_ATS_NO NUMBER)
AS
BEGIN
DBMS_SCHEDULER.define_program_argument (program_name => 'A411APPROVALEMAIL',
argument_position => 1,
argument_name          => 'P_ATS_NO',
argument_type          => 'NUMBER'
*,DEFAULT_VALUE => 0);*
DBMS_SCHEDULER.ENABLE (NAME => 'A411APPROVALEMAIL');
DBMS_SCHEDULER.create_job (job_name => 'EMAIL411'
|| P_ATS_NO,
program_name => 'A411APPROVALEMAIL',
enabled => TRUE,
comments => 'Comments'
EXCEPTION
     WHEN NO_DATA_FOUND THEN
     null;
END A411APPROVALEMAIL_async;
PROCEDURE "A411APPROVALEMAIL" (P_ATS_NO NUMBER)
as
strSubject varchar2(200) := ' NOTIFICATION';
strPtext varchar2(100) := ' ';
strEmail varchar2(100) :=’[email protected]';
strFromEmail varchar2(100) := 'MYTEST.AOL.COM'; --'' ; --
strBody varchar2(4000) := P_ATS_NO;
emailSentFlag varchar2(3) := 'NO';
strDistrict varchar2(240);
strAshManager varchar2(60);
myDocTypeID number;
lno varchar2(50);
begin
ash_email(strEmail,strFromEmail,'MY strSubject',' ',strBody,'170.208.17.13',25);
end A411APPROVALEMAIL;
end A411APPROVALEMAIL_PKG;
Howard

If I have define it using DBMS_SCHEDULER.define_program_argument
why do I have to do DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE.
Using this:
DBMS_SCHEDULER.SET_JOB_ARGUMENT_VALUE (
job_name IN VARCHAR2,
argument_name IN VARCHAR2,
argument_value IN VARCHAR2);
I am getting
Error at line 13: PLS-00103: Encountered the symbol "VARCHAR2" when expecting one of the following:
The symbol "(" was substituted for "VARCHAR2" to continue.
1. create or replace PACKAGE BODY A411APPROVALEMAIL_PKG
2. AS
3. PROCEDURE A411APPROVALEMAIL_async (P_ATS_NO NUMBER)
Also when I do the following isnt this setting the value
declare
begin
MYTEST.A411APPROVALEMAIL_PKG.A411APPROVALEMAIL_async*(:P_test);*
end
Howard
Edited by: csphard on Feb 26, 2010 2:50 PM
Edited by: csphard on Feb 26, 2010 3:06 PM

Similar Messages

  • CFLOGIN works, but not simultaneously on different servers/broswers

    I'm using CFLOGIN with application.cfc which works great when I test it - I'll call it login session A in browser window 1.
    When I simultaneously log into the same app on a different server with a different username (login session B in browser window 2), I can't login - unless I log out out of session A/browser window 1 first. Something in my new code is preventing me from logging into my app more than one time, even when the apps are on separate servers and I'm using different usernames.
    We have the same app on various servers (test/development/production), and I used to be able to login on 2-3 browsers or servers at a time - and I never had a problem until recently when I made some changes to the application.cfc and login code.
    I updated the code because before the session scopes and login credentials were not being initiated and terminated together (upon login/logout). Before, a user was clicking 'logout' and it was clearing the session scopes without invoking CFLOGOUT. Now, I fixed that, but I have another problem, which is that I can't log into the application on two different browsers or servers at the same time (even if I'm using different login usernames). Any suggestions would be appreciated.
    <cfcomponent displayname="Application" output="false">
        <cfset this.name = 'SampleApp'>
        <cfset this.SessionManagement = true>
        <cfset this.SetClientCookies = true>
        <cfset this.SessionTimeout = CreateTimeSpan( 0, 0, 5, 0 ) />
    <cffunction name="onSessionStart" access="public" returntype="void" output="false">
        <cfset session.hostname = 'http://'&#CGI.HTTP_HOST#&'/'>
        <cfset session.dbase = 'localdb'>
        <cfset session.roles = ArrayNew(1)>
        <cfreturn>
    </cffunction>
    <cffunction name="onApplicationStart" access="public" returntype="boolean" output="false">
        <cflog file="SampleApp" type="information" text="Application started." />
        <cfreturn true>
    </cffunction>
    <cffunction name="onApplicationEnd" returntype="void" output="false" hint="Executes on session timeout or if server shuts down.">
        <cfcookie name="CFID" value="#CFID#" expires="now">
        <cfcookie name="CFTOKEN" value="#CFTOKEN#"  expires="now">
        <cfreturn>
    </cffunction>
    <cffunction name="onRequestStart" access="public" returntype="void" output="true" hint="Executes before each page processes.">
        <cfargument name="targetPage" type="String" required="true"/>
            <cfsilent>
            <cfif GetAuthUser() NEQ ''>
                <cfif NOT isDefined('session.uname')>
                    <cfif CGI.HTTP_REFERER DOES NOT CONTAIN "login.cfm">
                        <cfinclude template="expired.cfm">
                        <cfabort>
                    </cfif>
                </cfif>
            </cfif>
            <cflogin>  
                <!--- Flash Remoting setCredentials() passes cflogin.user and cflogin.password using checklogin.cfc --->
                <cfif IsDefined('cflogin')>        
                    <cfquery name="qValidateLogin" datasource="#session.dbase#" username="#cflogin.name#" password="#cflogin.password#">
                        SELECT    role
                        FROM    session_roles
                    </cfquery>
                    <cfif qValidateLogin.RecordCount GT 0>
                        <cfloginuser name="#cflogin.name#" password="#cflogin.password#" roles="#qValidateLogin.ROLE#">
                        <cflog text="User - #cflogin.name#" type="Information" file="Filename" date="yes" time="yes">
                    <cfelse>
                        <cfinclude template="login.cfm">
                        <cfabort>
                    </cfif>
                <cfelse>
                    <cfif right(arguments.targetPage,10) is "logout.cfm">
                        <cflocation url="index.cfm">
                        <cfabort>
                    <cfelse>              
                        <cfinclude template="login.cfm">
                        <cfabort>  
                    </cfif>          
                </cfif>
            </cflogin>
            </cfsilent>      
    </cffunction>
    </cfcomponent>

    Oh no, that was my mistake. Thank you for catching that! That query is currently not being used on my Application.cfc page, which is why I wasn't having problems with it, but I'm glad you pointed it out to me. I had that code in my Application.cfc file just incase I wanted to check login from somewhere else, but my login query is actually being called with Flash Remoting using setCredentials() to connect to login.cfc. This is the correct query in my login.cfc file:
                <cfquery name="qValidateLogin" username="#session.uname#" password="#session.pword#" datasource="#session.dbase#">
                    select role from session_roles where role like 'xxxxx%'     
                </cfquery>
    I do think I figured out a solution to my problem though. I found out how to use applicationToken, which I understand if it is not set, by default will be the value of application.Name. If you want users to be able to log into multiple instances of  your application at the same time, you would give the applicationToken the same value. This would be great for clustered servers or sites with sub-domains.
    If you wanted to force only one login for the three different sites, you could give this a different value. VERY useful. So I have:
    <cfcomponent displayname="Application" output="false">
        <cfset this.name = 'SampleApp'>
        <cfset this.SessionManagement = true>
        <cfset this.SetClientCookies = true>
        <cfset this.SessionTimeout = CreateTimeSpan( 0, 0, 5, 0 ) />
        <cfset this.loginStorgage = "session">
        <cfset this.applicationtoken = 'SampleAppSub'>
    Now, I can log into this site on my development machine with multiple browsers pointing to the same site hosted on different servers - with no problem. I never had an issue with this before, but something else I recently added into my code in Application.cfc made this not work. I should probably also mention that I work on many different applications that all use the same application.Name even though they are different sites - we do this so the same settings can be deployed on different servers.
    With the applicationToken settings, I have it working again. Perhaps what made it break was setting this.loginStorage = "session"? Before this was not set and was using the default value of  "cookies" which I didn't want - because my site is used by different people on the same box and we have clustered servers.

  • Wake on Lan (works, but not always)

    Iam trying to get Wak on Lan working on my iMac. It works, but not always. When I put my mac to sleep en send the magic package, my mac turns back on. But when my mac turns to sleep and I wait a few hours (the next morning), my Mac doesn't respond to the same magic packag. When I wake up the Mac by hand, and put it back to sleep again, the magic package works again en turns the mac on.
    It almost looks like the mac goes into a deeper sleep mode after a few hours. Does anyone knows what could ben the reazon.

    mmm, It seems like my mac doesn't always turns to sleep mode. Most of the time it only turns off the screen (solid light). My energy settings are 10 minutes for the screen and 15 minutes for the mac. But after turning of the screen it never turns to sleepmode. Ecxept when I put it to sleep manualy.
    Strange thing is: when the screen is turned of, shouldn't I be able to get tot my files... (I can't actualy).

  • Problem with drivers for HP B109 a-m all-in-one, have printer working but not scanner in windows 8

    Still have a problem with the drivers in Windows 8 release preview, for my HP B109 a-m all-in-one, have printer working but not scanner, is there any chance of a fix before final release of Windows 8 ?.

    Review my post here:
    http://h30434.www3.hp.com/t5/Windows-8-Release-Preview/SOLUTION-Get-Win-7-Printer-Drivers-HP-Solutio...
    And see if something similar will work for you.

  • My Mac Mini doesn't recognize my Avengers DVD--it keeps saying "Supported disc not available." I've tried other DVD's which work, but not this one. itunes and everything else has been updated to the newest versions. Help?

    My Mac Mini doesn't recognize my Avengers DVD--it keeps saying "Supported disc not available." I've tried other DVD's which work, but not this one. itunes and everything else has been updated to the newest versions. Help? Also...It doesn't recognize the digital copy DVD.

    I have ALL the exact same symptoms as on my home computer.
    It sure sounds to me like something on the iPod is broken. If it's under warranty then I would send it back for repair. If not, check out some of the web repair services, such as iPodResQ etc.

  • Allt he links in the header of any websites are not working, I reinstalled fiorefix and it s the same. No problem in others browser. the tool bar is working but not the link sinside the web page located between the top 300px height

    all the links in the header of any websites are not working, the cursor is not changing into pointer and no way to click on any link located at the top of any website page. I reinstalled firefox and it s the same. No problem in others browser. the tool bar is working but not the links inside any web page located between the top 300px height.
    So I can t tlog into any website, i cant write an email as the compose button is located in the top of the page.. Please help, i have all my bookmarks into my firefox...

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • Speakerphone problem - lost voice from speakerphone while playing music or gaming youtube, while call or voice recording playing - all works fine, so speakerphone is working but not on all apps. hard reset done - no changes

    or gaming youtube, while call or voice recording playing - all works fine, so speakerphone is working but not on all apps. hard reset done - no changes.
    iphone 4
    SOLVED plugin to charger solved it - so problem was with contacts -- no idea why - phone is new - no water - no havy dust - usual using  
    hope will never return. Thanks

    We checked it with an iPhone 5 in house multiple times and could not reproduce this Problem. Must be something specific to your device. Maybe your speakerphone volume is turned down completely?
    Follow the latest Skype Community News
    ↓ Did my reply answer your question? Accept it as a solution to help others, Thanks. ↓

  • Hi!My 6 month old MBP 13" has suddenly stop charging.Mac is working,but not charging

    Hi!My 6 month old MBP 13" has suddenly stop charging.Mac is working,but not charging

    Troubleshooting MagSafe adapters  http://support.apple.com/kb/ts1713
    If you need to pursue further you can do it on-line,  start here
    https://selfsolve.apple.com/agreementWarrantyDynamic.do

  • My iPad cannot connect to my internet.  the internet is working but not with my ipad.

    my iPad cannot connect to my internet.  the internet is working but not with my ipad.

    Call your ISP (Internet Service Provider) and explain them your issue, it could range from having your router configured incorrectly to having a wiring issue. Personally, I have Comcast and they are great, no issues, and awesome customer service.
    Hope you get up and running ASAP

  • HT4993 My volume down button is not working.  The UP button works, but not the down button.  I have tried to restart it and that didn't solve the problem.

    My volume down button doesn't work on my iPhone.  The UP buttown works, but not the down button.  I have tried a hard reset and that didn't fix it.

    Try this.
    Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider if it appears on the screen - let go of the buttons. Let the iPad start up.

  • ICloud keeps asking for password but will not take it. All other devices work but not my IMac???

    ICloud keeps asking for password but will not take it. All other devices work but not my IMac???

    Exactly which password are you inputting? iCloud looks for your AppleID password.

  • Sap xi SCENARIO source directory working ,but not working target directory

    sap xi SCENARIO source directory working ,but not working target directory..
    plz help me

    Hi,
    Be more specific on the problem you are facing so that the ppl here can help..
    looks like your are trying to file to file scenario and the file is not generating at the target folder ...
    then check the communication logs of the receiver adapter using RWB->CC logs..
    post the error you have received there..
    HTH
    Rajesh

  • Can't sync ical on my iphone and imac. email and note work but not ical.  can anyone help.

    can't sync ical on my iphone and imac. email and note work but not ical.  can anyone help.
    thanks
    bmoreimac

    So how can i make it work that way, i asked one of my friends, and she says it works like that...when she delete the email on her iphone it is deleted on the mac too, what do i do to change this?....my mail it's hotmail, i don't know if its relevant

  • TS1702 facetime on my iphone works but not on my ipad

    Facetime on my iPhone 4S works but not on my iPad (3rd or 4th Gen)

    From the iPad User Guide:
    To use FaceTime, you need an Apple ID and a Wi-Fi connection to the Internet. When you open
    FaceTime, you may be prompted to sign in using your Apple ID, or to create a new account.
    Make a FaceTime call: Tap Contacts, choose a name, then tap the phone number or email address the person uses for FaceTime.
    You can also make a FaceTime call from the Contacts app.
    Rotate iPad to use FaceTime in either landscape or portrait orientation. To avoid unwanted orientation changes, lock iPad in portrait orientation. See Portrait and landscape orientation on page 20.

  • Just bought an iPhone 5C.. Safari is non-functional! A blank frozen screen! Any one else experience this? Horrid design Apple! It's your freaking web browser! Google Chrome works but not Safari! I may simply return this "upgrade" unless someone can help

    Just bought an iPhone 5C.. Safari is non-functional! A blank frozen screen... What gives? Safari is Apple's browser for gods sakes! Google Chrom works but not Safari? This is nuts. This is an "upgrade"?? Anyone else experiencing this? Or should I just give up and return this

    Are you always like this?
    First try a Reset: Hold down the home and sleep buttons, wait for the Apple logo, let go of the buttons.

Maybe you are looking for

  • Avoid shrinking of null values in a column....

    I created an RTF template but one of the columns is shrinking if it has null values. Is there any way to avoid this. If I replaced the null values with a dot it's workig fine, but the users dont wanna see the dots. Any ideas !!!!!!!!! Thanks in advan

  • Need an equal exchange of damaged game and I recieved bad service on a phone call please help!

    Sorry for the long post, please bare with me. Good Morning and Happy New Year. I wanted to share my frustrations and hope someone here could help me. I'm located near the Albany NY store, and on Black Friday I ordered Diablo 3  for ps4 for the sale p

  • Asset Master Record - Time Dependent tab - locations to be created

    Hi Guru's Hot to create the new locations in the Asset Master Record - time dependent tab. Some locations descriptions I need to change. Please help me. Regards Jenny Connes

  • Parent Child Data - Populate within a Dropdown

    Hi All ... I have a mysql database with the following fields ID (Int) - Title (VarChar) - ParentID (Int) This table is used to display categories with it's parent.  Categories with the ParentID of 0 means that it is a root category. What'm trying to

  • Z3 randomly stopped working!

    When I went to sleep last night, my phone was working fine. It was on my bed and charging. When I woke up this morning, it was still plugged in but completely dead.It won't turn on, it doesn't have the red light when charging, nothing. I tried a diff