Question about NOCOPY in function formal parameter

SQL> declare
2 v_1 number(8);
3 procedure p_1(parm_1 in out nocopy number) is
4 begin
5 parm_1 := parm_1 + 50;
6 raise program_error ;
7
8 end;
9 begin
10 v_1 := 100 ;
11 dbms_output.put_line('the value before call is : '|| v_1) ;
12 p_1(v_1) ;
13 dbms_output.put_line('the value after call is : '|| v_1) ;
14 exception
15 when others then
16 dbms_output.put_line('outer exception handle') ;
17 dbms_output.put_line('the value after call is : '|| v_1) ;
18 end;
19 /
the value before call is : 100
outer exception handle
the value after call is : 100
It was said that the keyword NOCOPY made the formal parameter recieve the reference of actual parameter.
my question is : why the value after call is not 150 ?

Thanks ,jeneesh.
I have read the article,but there is a different situation.If there is exception-handling part in the inner block,such as
procedure p_1(parm_1 in out nocopy number) is
begin
parm_1 := parm_1 + 50;
raise program_error ;
exception
when others then
dbms_output.put_line('the value in inter exception is : '|| parm_1) ;
end p_1;
it returns :
the value before call is : 100
the value in inter exception is : 150
the value after call is : 150
So , i put 'raise'
exception
when others then
dbms_output.put_line('the value in inter exception is : '|| parm_1) ;
raise;
end p_1;
it returns
the value before call is : 100
the value in inter exception is : 150
outer exception handle
the value after call is : 100
It conflicts with the formal parameter reference-pass,doesn't it?

Similar Messages

  • Some question about the renegotiation function in SRM Contract (GOA)

    Hi All Expert,
    We are on SRM 5/4.6,  there is a question about the renegotiation function in SRM GOA.
    Can we renegotiate the price for some parts in the GOA items with this function ( e.g. Only renegotiate one item in the contract) ?
    Will the item price updated automatically after the renegotiation?
    Many thanks in advance!!!
        Wendrin

    Hi Sanjeev,
    Many thanks for your help.
    One more question, if I add a new item when we renegotiation, will it be transfered to contract and create a new item after that?
    Thanks and best regards
    Wendrin

  • Questions about user-defined functions

    Hello all,
    I've got some questions about user-defined function in a message mapping:
    1) How can I get the current date/time in format yyyy-mm-dd hh:mm:ss ? What is the java code for this?
    2) I want to use the StreamTransformation constant TIME_SENT, only this is not in the right time-zone.
    It is GMT and it should be CET (1 hour difference). How can I convert this in Java?
    Can somebody help me with this?
    Thanks in advance.
    Kind regards,
    Marco van Iersel

    Hi Marco,
    If the date format is fixed as you have mentioned,please use this:
                                    String test = "2009-03-27 23:15:30";
              String test1 = test.substring(11,13);
              if(!test1.equals("23"))
              int a = Integer.parseInt(test1);
              int b = a+1;
              System.out.println("b"+b);
              String c = Integer.toString(b);
                                    test = test.substring(0,10)+" " + c + test.substring(13,19);
                                    return test;
              if(test1.equals("23"))
              test = test.substring(0,10)+ " 00" + test.substring(13,19);
              return test;
                                    else return "";
    Kindly let me know if this works.
    Thanks.
    Regards.
    Shweta

  • Question about PL/SQL Function in report

    Hi all. I have a (basic) question about using a PL/SQL function in a report. In my report page I have an item (PL/SQL function) that has the following syntax:
    return username from t1
    where username like 'Le%'
    I reference this item in an email process. Ideally this function would return all usernames that begin with 'Le' in the drafted email; however, its not looping so I'm only getting a return on the first name.
    I have a few books on PL/SQL but I'm not exactly sure where to start - I imagine there is a loop process I need to integrate into the function but, like I said, I'm not sure.
    I would have posted this to the PL/SQL forum but also wanted some feedback on whether or not using this method is the best way forward. Essentially I have a table with usernames and just want to send email messages based on some simple logic.
    Thanks!
    Len

    Hi Sergio,
    First, it's an honor to have you reply to my post. Thanks!
    To be more specific,
    T1 is a table containing the results from a user security scan. Username is a column in this table containing user names. What I have done is create a page in HTML DB with the following elements:
    1. An 'Item' containing the PL/SQL function that is hidden. The purpose of this Item is to generate information from T1 that meets the simple logic parameters - in this case, the user names that begin with "Le". I have called this Item P145_TT
    2. A 'Process' containing references to HTMLDB_MAIL. The 'Process' looks similar to this:
    HTMLDB_MAIL.SEND(
    P_TO => '[email protected]',
    P_FROM => 'Anon Email Account',
    P_BODY => 'Note: This message was automatically generated. Do not attempt to reply to this email.
    These are the users that begin with Le: '||:P145_TT||' ',
    P_SUBJ => 'Summary');
    3. A 'Button' to submit the process and (hopefully) send the message containing all users that adhere to the logic in the function.
    4. If I use 'return username from t1...' I will get a username generated, but like I said previously, it only gives me the first and does not loop.

  • Question about Custom Escalation Function

    I want to use a Custom Escalation Function described on this document:
    http://docs.tpu.ru/docs/oracle/en/owl/E14571_01/integration.1111/e10224/bp_workflow.htm#BACHEFDH
    I want to execute a custom function on task EXPIRATION.
    Main Question: The "Custom Escalation Function" is just for Escalation or i can use too for EXPIRATION ?
    Thanks.
    Victor Jabur

    Okay Experts. The problem is solved. There was no problem with the custom key figure function. The problem was with the sales order data. The sales order details for the material in question were under the "make to order" segment and the other transaction data info was in the "make to stock" segment.
    Once i found this out , i tried loading someother material and it worked perfectly.
    Thanks
    Aparna

  • Question about calling a function.

    Im trying to call a function when a button is clicked, im using actionlistner() on the button, which looks as so :-
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
            jButton1ActionPerformed.keyPad();
        }then trying to run this fuction when the button is clicked:-
    private void keyPad(java.awt.event.ActionEvent keyPad){
            String oldNumber;                           //set oldNumber to String
            String newNumber;                           //set newNumber as a String
            jButtonCall.setEnabled(true);
            jLabelInstruction.setText("Press 'Call' When Ready...");
            oldNumber = jTextFieldScreenDisplay.getText();      //get txt, if any, assign to oldNumber
            newNumber = oldNumber + "1";                        //set newNumber as oldNumber adding String to end
            jTextFieldScreenDisplay.setText(newNumber);         //Display newNumber
        }Im new, please go easy, everything is done in the main class, but would like to take this one stage further and create a seperate class outside the main, but i wan to get this working from within the main first.
    Cheers Guy's
    Doo

    So what is your question?
    Besides:
    - the things are called "methods"Hello There!
    Sorry, i'm trying to call a 'method'. I have buttons numbered 0-9 which enter into a text field once clicked using ActionEvent. At the moment each button has its own block of code which is a bad habit as its the same code over with one differance, the number value.
    Am i right in thinking i should create one method? Then calling this method on each button.
    The problem i have is i am unsure of the code to call the method within each buttons ActionEvent ie:-
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
             //call the method keyPad when button is clicked
    private void keyPad(java.awt.event.ActionEvent keyPad){
              //run this
    - if you define a method to accept a parameter, you
    actually have to provide a parameter upon calling
    that method.I don't understand???
    Thanks
    Doo

  • I have a question about the Siri function.

    Here in Belgium, we speak Dutch and also French and English. But I think when you use the Siri function it is always easier to use it with your own language ( Dutch). 28th October, the iphone4S will be launched here in Belgium, but only with a Englisch version of the Siri function. So my question is that you have any idea when te Dutch version will be available in Belgium, or when i buy an iphone 4S with English version that I can update it to a Dutch version when it will be launched..
    Thank you for helping
    Dylan

    Nobody here can tell you anything more about Apple's plans than what they have already publicly stated, which is that more languages were promised for later (including Japanese, Chinese, Korean, Italian, and Spanish in 2012).

  • Question about "share screen" function

    When I am watching at another persons screen, is there a way to hover your mouse over the remote computers window without it effecting the pointer on the remote computer?
    Thank you

    kevinmathie wrote:
    Hi all,
    I'm recording vocals on a song that has lots of ritardandi and rubato. While the vocalist is here, we'll be setting her part of the tempo mapping in "stone," so to speak, but not necessarily the instruments' tempo mapping between her verses or before her verses.
    I usually record this kind of thing in Digital Performer, because I know that the audio sticks like glue to any ritardando, accelerando, etc., I may put in after recording the audio.
    My question: Does the "Follow Tempo" box in Logic let me program in ritards after the audio is recorded, without messing up how the audio is synced to the sequence?
    Yes.
    In other words, if the audio region spans bars 12-24, and I plug in a big ritard at bar 15, followed by "a tempo" in 16 after the audio is recorded, will the audio region follow the tempo mapping?
    Yes.
    +"Plug in a big ritard"+ ? You are one tough composer!
    2nd question: Does it do it automatically? Or, like Digital Performer, do I need to tell it to follow the tempo mapping after I change tempo?
    No, it 'responds' to tempo events in the *tempo track*.
    Any other tips/suggestions regarding this function that you feel would be helpful for me?
    Yep, it can eat up RAM. When you enable follow tempo for a track, the whole audio file is loaded into RAM. Use a utility like MenuMeters to keep an eye on RAM use. http://www.pure-mac.com/diag.html#menumeters
    You can find all relevant info on pages 526-527 of the *Logic Pro 8 User Manual*.
    regards, Erik.

  • Question About Unsupported Excel Function Workarounds

    Hi everyone! I hope this is ok to post something like this here. I haven't seen any rules against it so I am hoping I am able to. My apologies in advance if this is something I should ask in another location.
    My question / issue is in regards to the unsupported ISNA and ISBLANK functions in Excel. I can't seem to find a suitable workaround for XCelsius without using those two formulas in Excel and I am hoping someone here will be able to help or guide me.
    I have a cell that is for my input. If that cell has nothing in it I want Excel to continue to return the #N/A error as it is ignored and not shown in the List Box I have built in XCelsius. If there is a value input and it is not found in the Excel model I want it to return "No Record". Finally, if it is found then it will display the appropriate list of items.
    Any suggestions on a way to get this to function within Excel that will be compatible within XCelsius?
    Thanks in advance for your help everyone!

    Hi Aaron,
    both ISNA and ISBLANK are supported functions. The support for most IS() functions was added in SP1. They are not in the list in the help yet, but there should be the list of added functions in release notes. So, the following functions are supported:
    ISERR
    ISERROR
    ISEVEN
    ISODD
    ISLOGICAL
    ISNONTEXT
    ISTEXT
    TYPE
    ISNUMBER
    ISNA

  • Question about the GPS function

    I have just got my iPhone 3G, but still need to wait a couple of days to
    get my mobile number transferred.
    My question is: i don't have at the moment any mobile services from my provider.
    (No Service) I do have a WLAN connection. Should my GPS function in Google Maps still work? At the moment the icon is only spinning spinning and spinning....

    Thanks All!
    I turned it off and on again. waited a couple seconds outside (in the rain )
    And it is working great. 100% accurate
    Thanks Again.

  • Question about the alarm function.

    Has anyone used the alarm function on the iPhone?
    This may be a dumb question, but does the phone need to be in sleep mode, not shut off for alarms to work? If that is the case (I expect it is) would it be best to leave on while charging overnight for an early morning alarm to work properly?
    I think I've answered my own question, because I doubt an alarm can go off if the phone is off, but probably would if it was just asleep. Any thoughts on the alarm function in general?
    Thanks,
    CD3

    CD3, I would also assume the same but I do not really
    know the answer. To answer your question, yes. I use
    the Alarm function everyday thought I do not know why
    as I get up before the !@# thing wakes me up.
    Your answer is funny. I only need the alarm to wake me for a flight I'm taking to a show in Denver in Sept. Don't want to miss the flight because the alarm didn't work because the phone was completely off.
    So the non lazy way to answer my question...I'm going to try it myself. If it works one way or the other I'll mark my question answered and get myself a point or 2
    CD3

  • Question about SAP standard functionality related to the GL master record.

    My question is;
    Is this a SAP standard functionality to update the description ( long text or short) of a GL account (in master record) in one company code when we change the description of the same GL account in another company code which is assigned to the same chart of account?
    For example we have two company codes and both are assigned to the same chart of account and we are changing long text of one GL account in one CoCd. Should it update the long text of the same GL account in other CoCd assigned to the same chart of account? If so, then is this a standard SAP functionality or there is any setting where we can turn this functionality on or off.
    Thanks in advance for help n answer.

    Hi 
    GL accounts control takes place two leval
    1.Chart of account leval
    2.Comapany code leval
    In chart of account leval  Type/Description,Keywoard Translation,Information of Chart of Account of account tabs are controlled ,if u made any changes above tabs that should be applicable to all company codes using same chart of accounts.
    u r changing the short text,long text these are controlled by char of accounts leval this should be applicalbe to all company codes, u can't maintain company code leval type and description.

  • A simple question about parameters to functions

    hello,
    Passing parameters between functions in java suppose to be "by reference".
    I have a simple test case that it doesn't work.
    I'll be happy if someone will tell me what is wrong:
    public class Test
    String text ;
    public static void main(String[] args)
    Test test = new Test();
    test.poo() ;
    public void poo ()
    text=new String(" bbb") ;
    foo (text) ;
    System.out.println ("final text= " +text) ;
    private void foo(String text)
    System.out.println ("text before update= " +text) ;
    text="aaa" ;
    System.out.println ("text after update= " +text) ;
    The output here is:
    text before update= bbb
    text after update= aaa
    final text= bbb
    How can you explain that?
    thank you,
    Moran

    > Passing parameters between functions in java suppose to be "by reference".
    Nope. First, we call them "methods" rather than "functions". Second, everything in Java is passed "by value". Everything.
    Pass-by-value
    - When an argument is passed to a function, the invoked function gets a copy of the original value.
    - The local variable inside the method declaration is not connected to the caller's argument; any changes made to the values of the local variables inside the body of the method will have no effect on the values of the arguments in the method call.
    - If the copied value in the local variable happens to be a reference (or "pointer") to an object, the variable can be used to modify the object to which the reference points.
    Some people will say incorrectly that objects are passed "by reference." In programming language design, the term [i]pass by reference properly means that when an argument is passed to a function, the invoked function gets a reference to the original value, not a copy of its value. If the function modifies its parameter, the value in the calling code will be changed because the argument and parameter use the same slot in memory.... The Java programming language does not pass objects by reference; it passes object references by value. Because two copies of the same reference refer to the same actual object, changes made through one reference variable are visible through the other. There is exactly one parameter passing mode -- pass by value -- and that helps keep things simple.
    -- James Gosling, et al., The Java Programming Language, 4th Edition

  • Question about File upload functionality in Weblogic

    Hi,
        We're currently trying to deploy a web application on the weblogic 12c server (via war file). And the app needs to upload a text file onto the a temperary directory within weblogic server. And on the web page side, we use JQuery File upload plugin.
        My question is, on the file receiver side, does weblogic provide any tools to receive the uploaded file and store it?
    Thanks very much in advance.

    Hi,
    Before setting the string or xstring to server->response->set_cdata (string) or server->response->set_data (xstring) try this:
    CONCATENATE 'attachment;filename=' lv_filename '.xml'  INTO lv_string.
    * Setting the filename by default
      server->response->set_header_field( name  = 'Content-Disposition'
                                          value = lv_string ).
    Hope this helps.
    Regards,
    Abhinav

  • Question about caml query with UserID/ parameter (working outside of sharepoint )

    I have to develop a custom view. I should take the current user and query it in List1 to obtain owned group names. Then I am supposed to query each group name in a List2 to obtain corresponding users. And In a new custom list view I should display those users..
    Let's assume I'm working in a c# class in VS. Below is my initial code to fetche owned groups by the current user.
    SPQuery query = new SPQuery();  
    query.ViewFields = @"<FieldRef Name='Title'/>";  
    query.Query = @"<Where><Eq><FieldRef Name='Title' /><Value Type='Integer'><UserID/></Value></Eq></Where>";  
    SPList lstUsers = web.Lists["Users"];  
    SPListItemCollection userItems = lstUsers.GetItems(query);  
    foreach (SPListItem myitem in userItems)  
    {Response.Write(myitem["Title"].ToString());}  
     The "<UserID/>"   parameter in caml query does not work outside...
    query.Query = @"<Where><Eq><FieldRef Name='Title' /><Value Type='Integer'><UserID/></Value></Eq></Where>";
    How can I obtained the current logged user from outside of sharepoint?
    Should I write my code somewhere other then a seperate vs c# class?
    I appreciate any idea and suggestions....

    If you are quering a User ID of UserField, you need to add LookupId='True'/ to FieldRef
    <Eq>
             <FieldRef Name=Owner' LookupId='True'/>
             <Value Type='User' >2</Value>
    </Eq>
    Thanks, Rocky Fernandes

Maybe you are looking for

  • Please help with my incessant spinning wheel of death!

    I have almost always had the spinning circle of death…  Almost the whole life of this late 2011 15" 4 GB mbp.  I just can not easily use this computer anymore. It takes so long to do anything.  I need to exit all apps but the one I am using to make i

  • Reading and recording at the same time with AudioUnit

    Hi, I am trying to read and record at the same time on the iPhone with AudioUnit. For the reading part I made an AUGraph which works fine, constructed like that: NewAUGraph(&_graph); _outputUnitComponentDescription.componentType = kAudioUnitType_Outp

  • Apple Home Page not loading correctly?

    Only when I visit www.apple.com, the images do not load. This is extremely stressful as it also disorganizes everything on the site. Is it some preference on my MBP (or Safari) that is wrong, or what?? Is anyone else experiencing this on the apple ho

  • 785GM-E65, 4 DIMM's

    Just read the stickies concerning memory.  A little background 1st. Got this mobo with a used system, came with PSD34G1333K, 2 x 2gb Patriot pc1333.  Worked fine.  Went to Fry's and got 2 x 2gb of TW3X4G1333C9A, Corsair pc1333.  Staff said it should

  • Color to FCP with a 3d rendered movie wacky output

    I have a movie I rendered in Cinema 4d that I was color correcting in Color. I had it imported into FCP, then sent to Color, did my corrections/stylization, rendered and sent back to FCP. Problem is, once it's back in FCP, the movie shows the correct