Read variable from other method

i am coding a method which required a reading from a variable in another method.
what's the syntax for getting the variable???
I tried.....
++++++++++++++++++++++++++++++++++++++++++++++++++
public static void main (String[ ]args)
range_1
private static double area (int radius, final double pi)
radius = range_1
return radius * radius * pi
++++++++++++++++++++++++++++++++++++++++++++++++++
but it doesn't work

"private static double area (int radius, final double pi)"
final double pi? as the method parameter? ROFLHAHAHAHAHAHAHAHAHAHAHA
That made my day.
As for your question, make range_1 a global variable, in other words, declare it outside your main method
Something like
public class gary{
int range_1;
public static void main (String afgfg[]){
range_1=//something;
private static double area (int radius)
radius = range_1
return radius * radius * 3.14

Similar Messages

  • How do you use the windows User32.dll Library functions to read variables from other applications that are running

    I am trying to read a text box from a programme running at the same time as my Labview application using calls to the Windows
    User32.dll. I believe I need to find the window handle for the 'form' containing this text string and use this together with
    various other defined input variables to access the sting.
    I have no experience of using this 'Call Library Function Node', but have an understanding of the 'C' programming language. Does anyone have
    example Labview code showing how this might be done.
    Thanks

    If you're trying to access information that's being displayed in the window of another application and that application has no ActiveX interface, then yes, Windows calls can be used. There's a very good example on calling DLLs that ship with LabVIEW. Open the Example Finder (Help->Find Examples) and switch to the Search tab. Enter "Call" in the search box and open the VI "Call DLL". Run the VI, select any of the examples, and click the "Open Example VI..." button. That shows you how to call a DLL.
    Now, given that you have no experience in calling DLLs, have only an "understanding" of C (which to me means you have never written something like a DLL), and don't seem to know that much about what Windows functions you may need, you're going to find this route pretty difficult, especially since you have to deal with Windows API calls, which are not always that easy to do from LabVIEW.
    Let me propose an alternate solution. Go over to http://www.autoitscript.com/autoit3/ and download AutoIt. This is an automation tool that allows you to automate just about anything you want. It has an ActiveX interface that you can call from LabVIEW. I've attached an example VI that shows you how to use it to get the value of a text box from one of the tabs in the computer "System Properties" control panel applet.
    Attachments:
    AutoIt Example (v7).vi ‏25 KB

  • Reading a variable from one method to another method

    I am pretty new to Java and object code, so please understand if you think I should know the answer to this.
    I wish to pass a variable from one method to another within one servet. I have a doPost method:
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              HttpSession session = request.getSession();
             String userID = (String)session.getAttribute("userID");
             String title = request.getParameter("title");
            PrintWriter out = response.getWriter();
            out.println("userID is ..."+userID);
    } and wish to pass the variable userID to:
      public static void writeToDB(String title) {
             try{
                  String connectionURL = "jdbc:mysql://localhost/cms_college";
                  Connection connection=null;     
                 Class.forName("com.mysql.jdbc.Driver");
                 connection = DriverManager.getConnection(connectionURL, "root", "");
                 Statement st = connection.createStatement();         
                   st.executeUpdate ("INSERT INTO cmsarticles (title, userID) VALUES('"+title+"','"+userID+"')");
             catch(Exception e){
                   System.out.println("Exception is ;"+e);
        }because, at the moment the userID cannot be resolved in the writeToDB method. Thanking you in anticipation.

    Thanks for responding.
    If I replace
    public static void writeToDB(String title)with
    public static void writeToDB(String title, String userID)It throws up an error in the following method
    public void processFileItem(FileItem item) {
              // Can access all sorts of useful info. using FileItem methods
              if (item.isFormField()) {
                   //Map<String, String> formParameters = new LinkedHashMap<String, String>();
                   //String filename = item.getFieldName();
                   //String title = item.getString();
                   //System.out.println("received filename is ... " + filename );
                   //formParameters.put(title, filename);
                   } else {
                      // Is an uploaded file, so get name & store on local filesystem
                      String uploadedFileName = new File(item.getName()).getName();            
                      File savedFile = new File("c:/uploads/"+uploadedFileName);
                      long sizeInBytes = item.getSize();
                      System.out.println("uploadedFileName is " + uploadedFileName);
                      String title = uploadedFileName;
                      System.out.println("size in bytes is " + sizeInBytes);
                      writeToDB(title);
                      try {
                        item.write(savedFile);// write uploaded file to local storage
                      } catch (Exception e) {
                        // Problem while writing the file to local storage
              }      saying there are not enough arguments in writeToDB(title);
    and if I put in an extra argumenet writeToDB(title,String userID);
    again it does not recognise userID

  • How to Handle Automatic Skip Property of Item in Oracle Forms through Custom.pll or from other methods

    Hi All,
    How to Handle Automatic Skip Property of Item in Oracle Forms through Custom.pll or from other methods.
    This is a enhancement requirement.
    When ever user enter value in field 1 then automatically cursor should go to next field.

    Hello Bobb,
    You can create a trigger(when-list-changed) for each list item where you could:
    1.recreate the record groups and then use POPULATE_LIST so you can hide the selected values. In forms builder online help there are some good examples about create record groups dynamically.
    or
    2.you can perform a validation instead of hiding the selected values. If the values is already selected the display a message 'Value already selected....'
    Second option is much faster(only an 'if clause')
    Hope this helps.
    Regards,
    Alex

  • GetDSN from other method

    Hi,
    can some one tell me how to call the dsn from other method within the same cfc.
    this getDSN method return me the correct dsn that i declared from application.cfm.
    <cffunction name="GetDSN" access="public"  output="false"    hint="Gets the DSN">
    <cfargument name="dsn" required="yes">
        <cfreturn this />
    </cffunction>
    how can i get the dsn from above method.  What i have is not working..........
    <cffunction name="findDupicate" output="no" access="public" returntype="query">
            <cfargument name="form" required="yes" type="struct">   
            <cfquery name="check_duplicate" datasource="#GetDSN#">
            SELECT voucherNo
            FROM voucher
            WHERE voucherNo= <cfqueryparam value="#arguments.form.voucher#" cfsqltype="cf_sql_varchar" />
        </cfquery>
        <cfreturn check_duplicate>
        </cffunction>
    Thanks

    Two things that immediately spring to mind.
    getDsn() is misnamed, or does the wrong thing.  It doesn't return a DSN, it returns the entire object (return this).
    I your CFQUERY tag you're not calling getDsn(), you're just using it as a value, eg: "getDsn" is a reference to the method itself, but "getDsn()" is actually CALLING the method.
    Oh a third thing: something called getDsn() would not normally take an argument that is the very thing it is supposedly getting.  IE: why is getDsn() taking an argument of dsn?  It should be RETURNING the DSN name, not having it passed into it.
    Adam

  • Using a variable from another method within another method

    I have a couple methods. In the beginning of the class I declared the double variables. Then I have a method1 that in that class that changes those double variables. Then the last method2 runs, and is suppose to print information to the screen with the changed variable information all being called from another class. How do I get those changed double variables to be read in method2?

    Sorry about all that, when I paste it in from the compiler it's skews it some, but hopefully this should be more readable
    * Project Filename: Lab1s2
    * Program Filename: Lab1s2.java
    * I/O Files used:
    * Fuction:          This program will use interactive input to ask cost of a
    *                   product in dollars and cents (eg. 17.50).  If the product
    *                   is not less than $100.00, an error message will be displayed
    *                   and input will be requested again.  Once a valid value is
    *                   given, the program will calculate the fewest bills and change
    *                   to be returned if the customer gives a $100.00 bill.
    * Formulas:         (100 - amount = change)
    * Algorithm:
    * Purpose:          The main method calls other methods found in the MoneyXX class
    *                   that will accomplish the function of the project.
    public class Lab2sl
         public static void main( String[] args ) // main method begins program execution
         Money2sl myMoney2sl = new Money2sl(); // create myMoney2sl object and assign it to Money2sl
            myMoney2sl.inputSL();// calls input method and pass argument
            myMoney2sl.changeSL(); // calls change method
            System.out.println(); // output a blank line
         myMoney2sl.outputSL(); //calls outputSL to show results
    * Project Filename: Money2SL.java
    import java.util.Scanner;
    import java.util.Calendar;
    public class Money2sl
         Scanner input = new Scanner( System.in ); // create Scanner to obtain input from command window
        private double change,
                       amount; // instant variable, stores amount
        private double twentyD = 20.00;
        private double tenD = 10.0;
        private double fiveD = 5.0;
         private double dollar = 1.0;
         private double quarter = 0.25;
         private double dime = 0.10;
         private double nickel = 0.05;
         private double penny = 0.01;
         private double numTwentyD;
         private double numTenD;
         private double numFiveD;
         private double numDollar;
         private double numQuarter;
         private double numDime;
         private double numNickel;
         private double numPenny;
        // inputSL() method gets amount, checks to see if it is under $100, stores amount into variable
        public void inputSL() //input method
             Calendar dateTime = Calendar.getInstance(); // get current date and time
            //print date and time
            System.out.printf( "%s\n", "nothing" );
            System.out.printf( "%1$ta, %1$tB. %1$te, %1$tY %1$tr\n\n", dateTime );
             //print output
                System.out.println( "Please enter the amount of money (less than $100) that you will spend: ");  // prompt
              amount = input.nextDouble();
              while ( amount > 100 )
                  System.out.println( "error - enter amount less than $100");
                System.out.println( "Please enter the amount of money (less than $100) that you will spend: ");  // prompt
                  amount = input.nextDouble();
             } // end inputSL method
        // changeSL() calculates change from amount entered out of $100
         public void changeSL()
              change = 100 - amount; // calculate change
              while(change > 0)
            if ( change - fiveD >= 0 )
                        numFiveD ++;
                       change -= fiveD;
              if ( change - fiveD >= 0 )
                        numFiveD ++;
                       change -= fiveD;
              if ( change - dollar >= 0 )
                        numDollar++;
                       change -= dollar;
              if ( change - quarter >= 0 )
                        numQuarter ++;
                       change -= quarter;
              if ( change - dime >= 0 )
                        numDime ++;
                       change -= dime;
              if ( change - nickel >= 0 )
                       numNickel ++;
                       change -= nickel;
              if ( change - penny >= 0 )
                        numPenny ++;
                       change -= penny;
         } // end changeSL method
        //outputSL() displays original amount, change dollar amount, and change in individual bills and coins
        public void outputSL()
             System.out.printf( "$%.2f dollars will return $%.2f, which is: ",
                                 amount, change );
            System.out.println(); // blank line
             System.out.println(); // blank line
            if ( numTwentyD > 0 )
                 if ( numTwentyD > 1)
                      System.out.println( numTwentyD + " twenty dollar bills" );
                 System.out.println( numTwentyD + " twenty dollar bill" );
            if ( numTenD > 0)
                 if ( numTenD > 1 )
                      System.out.println( numTwentyD + " ten dollar bills" );
                 System.out.println( numTwentyD + " ten dollar bill" );
            if ( numFiveD > 0)
                 if ( numFiveD > 1 )
                      System.out.println( numFiveD + " five dollar bills" );
                 System.out.println( numFiveD + " five dollar bill" );
            if ( numDollar > 0)
                 if ( numDollar > 1 )
                      System.out.println( numDollar + " one dollar bills" );
                 System.out.println( numDollar + " one dollar bill" );
              if ( numQuarter > 0)
                 if ( numQuarter > 1 )
                      System.out.println( numQuarter + " quarters" );
                 System.out.println( numDollar + " quarter" );
              if ( numDime > 0)
                 if ( numDime > 1 )
                      System.out.println( numDime + " dimes" );
                 System.out.println( numDime + " dime" );
              if ( numNickel > 0)
                 if ( numNickel > 1 )
                      System.out.println( numNickel + " nickels" );
                 System.out.println( numNickel + " nickel" );
              if (numPenny > 0)
                 if ( numPenny > 1 )
                      System.out.println( numPenny + " pennies" );
                 System.out.println( numPenny + " penny" );
    }

  • Pass a variable from a method to another

    Hello,
    how is it possible to use, in a method, a variable instanciated in another method? None of them is a constructor. I saw many examples in the tutorials with constructors, but there it's different...
    This is a piece of my program:
    String string_;
    String other;
    public String getName()throws IOException{
         byte[] input = new byte[50];
         System.out.println("give string_");
         System.in.read(input);
         String other = new String(input);
         other = other.trim();
         System.out.println("other = "+other);
         return other ;
    public String Native( ){
         System.out.println("other in Native() = "+ other);
         string_ = other;
         return string_;
    When I run it I get the answer:
    other in Native()= null
    So the value I gave to other didn't pass from getName() to Native()...
    How can I do that?

    Your code:
      String string_;
      String other;
      public String getName()throws IOException {
        byte[] input = new byte[50];
        System.out.println("give string_");
        System.in.read(input);
        String other = new String(input);
        other = other.trim();
        System.out.println("other = "+other);
        return other;
      public String Native() {
        System.out.println("other in Native() = "+ other);
        string_ = other;
        return string_;
      }change to:
      String string_;
      String other;
      public String getName()throws IOException {
        byte[] input = new byte[50];
        System.out.println("give string_");
        System.in.read(input);
        String other = new String(input);
        other = other.trim();
        System.out.println("other = "+other);
        return other;
      public String Native(String another_other) {
        System.out.println("other in Native() = "+ other);
        another_other+="\tanother_other";
        string_ = another_other;
        return string_;
      }You'll see the change. You want to pass somthing into Native specifically and change it locally, and see the difference, right? Well this is the way you pass something in.
    ~Bill

  • Accessing public variables from other classes

    Probably a simple questions, but how can I access a variable from another class. My exact situation is as follows.
    A class called WorldCalender has a variable which is defined: public int hour; (the value is given to it elsewhere).
    I want to access this variable and increase it by one in a subroutine in the class Hour. In this class I have put: WorldCalender.hour++; but it doesn't seem to work. How should I do it?

    don't expose the hour variable at all.
    have a method eg addToHourBy( int hrs )
    Probably a simple questions, but how can I access a
    variable from another class. My exact situation is as
    follows.
    A class called WorldCalender has a variable which is
    defined: public int hour; (the value is given to it
    elsewhere).
    I want to access this variable and increase it by one
    in a subroutine in the class Hour. In this class I
    have put: WorldCalender.hour++; but it doesn't seem to
    work. How should I do it?

  • Read variable from c++ applicatio​n

    I would like to do this but I don't know how it could be done: (the Labview will run parallel with c++ application and read the variable from the c++ application)
    Thank you for your help.

    "XN" <[email protected]> wrote in message
    news:[email protected]..
    > I would like to do this but I don't know how it could be done: (the
    Labview will run parallel with c++ application and read the variable from
    the c++ application) Thank you for your help.
    There are several ways. You'll have to describe your application more if you
    want a recomendation about the prefered method. For instance, is it a
    command line application? Do you have the source code? How much data is
    there to transfer (bytes, kB, MB? per second). Do you want to poll this
    value, or do you need to get a notification if the value is changed? Etc.
    Some ways to do this:
    Through the command line (using pipes in LabVIEW).
    With a TCP/IP connection.
    Memory mapped files.
    File sharing.
    Windows messaging system.
    Regards,
    Wiebe.

  • Read variables from XML

    Is it somehow possible to read variables and values from xml into an PowerShell script without specifying each of them separately?
    For example I've set the following variables:
    $arrPostcode @()
    $arrPostcode += ,@('1234AB', 'City1')
    $arrPostcode += ,@('4567CD', 'City2')
    $blnHome =$True
    $blnNld =$False
    $intNumbers =556
    $strText ='Something'
    And I have a xml file like (can be ajusted when required to get a better result):<?xml version="1.0"?>
    <Objects>
    <Object Type="System.Management.Automation.PSVariable">
    <Property Name="Name" Type="System.String">arrPostcode</Property>
    <Property Name="Value" Type="System.Object[]">
    <Property Type="System.Object[]">
    <Property Type="System.String">9874ZX</Property>
    <Property Type="System.String">City5</Property>
    </Property>
    <Property Type="System.Object[]">
    <Property Type="System.String">6541UH</Property>
    <Property Type="System.String">City3</Property>
    </Property>
    </Property>
    <Property Name="ModuleName" Type="System.String" />
    </Object>
    <Object Type="System.Management.Automation.PSVariable">
    <Property Name="Name" Type="System.String">blnHome</Property>
    <Property Name="Value" Type="System.Boolean">False</Property>
    </Object>
    <Object Type="System.Management.Automation.PSVariable">
    <Property Name="Name" Type="System.String">blnNld</Property>
    <Property Name="Value" Type="System.Boolean">True</Property>
    </Object>
    <Object Type="System.Management.Automation.PSVariable">
    <Property Name="Name" Type="System.String">intNumbers</Property>
    <Property Name="Value" Type="System.Int32">13</Property>
    </Object>
    <Object Type="System.Management.Automation.PSVariable">
    <Property Name="Name" Type="System.String">strText</Property>
    <Property Name="Value" Type="System.String">World</Property>
    </Object>
    </Objects>And say I want to use the 'default' values if the xml file was not
    found, but if the xml file is found I want to use (replace) the
    variables and values defined in that xml file.

    First of all your sample code I not PowerShell.  Second XML has no "variables".  It is a structured document.  When imported into PowerShell it shows up as an XMLDocument object.  If you want values from the document you have
    to extract them by direct reference or query.
    The simple answer to your question is "yes".  You can assign a default to a variable which will be updated only if the value exist in the document.  The rest cannot be determined from what you have asked.
    Start by learning some of the basics of PowerShell scripting and ask a new question when you can see what it is you want to do.
    Here is a good starting point:
    http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx
    The XML you have posted is actually PowerShell object serialization format so it is already a PS object.  It is not just arbitrary XML.  It isnot clear howyou acquired this which is another reason to learn more of the PS basics. 
    It appears that you have used ConvertTo-XML to create an XML object.  This can be sued to dave values and state but may not bethe best method.  Export-CliXml can persist an object and restore it more directly.  We can wrap this in a function
    that can be used to default values.
    Look into Export.CliXml and Import-CliXml.
    Example:
    $ziptable=@()
    $myProps=@{
    Name='Detroit'
    ZipCode='20192'
    $ziptable+=New-Object PsObject -Property $myProps
    $myProps=@{
    Name='New York'
    ZipCode='90100'
    $ziptable+=New-Object PsObject -Property $myProps
    $ziptable | Export-CliXml myzips.clixml
    $savezips = Import-CliXml myzips.clixml
    Result demo:
    PS C:\scripts> $savezips
    ZipCode Name
    20192 Detroit
    90100 New York
    PS C:\scripts> $savezips[0]
    ZipCode Name
    20192 Detroit
    PS C:\scripts> $savezips[0].Zipcode
    20192
    PS C:\scripts>
    Of course a simple lookup table would be done with a pure hash and persisted.  For more comples things I would use a custom dataset which can also be persited and restored the same way.  Sort of a poor man's portable database.
    ¯\_(ツ)_/¯

  • Call variable from outside method

    I have a method for a listSelectionListener with a variable in it called "results", I want to be able to get the information from this variable outside of this method. In my main class alled "gifts" I have a TextArea and I want "results" to be displayed in it but I can't get results into it because it's in a seperate method. Anyone know how I can do this?
    Heres some relevant code:
    public Gifts()
              super( "Spiritual Gift Database" );
              try
                   Class.forName(JDBC_DRIVER);
                   conn = DriverManager.getConnection(DATABASE_URL);
                   stat = conn.createStatement();
                   ResultSet rs = stat.executeQuery("SELECT heading1 FROM demo");
                   Vector vector1 = new Vector();
                   while(rs.next()) vector1.add(rs.getObject(1));
                   container = getContentPane();
               container.setLayout( new FlowLayout() );
                   nameListPanel = new JPanel();
                   statListPanel = new JPanel();
                   buttonPanel = new JPanel();
               nameList = new JList(vector1);
               nameList.setVisibleRowCount( 9 );
                   nameList.setPrototypeCellValue("XXXXXXXXXXXX");
                   nameList.addListSelectionListener(
                        new ListSelectionListener()
                             public void valueChanged(ListSelectionEvent event)
                                  try
                                       ResultSet resultSet = stat.executeQuery("SELECT * FROM demo");
                                       StringBuffer results = new StringBuffer();
                                       ResultSetMetaData metaData = resultSet.getMetaData();
                                       int numberOfColumns = metaData.getColumnCount();
                                       for(int i = 1; i<=numberOfColumns; i++)
                                       results.append(metaData.getColumnName(i) + "\t");
                                       results.append("\n");
                                       while (resultSet.next())
                                            for(int i = 1; i<= numberOfColumns; i++)
                                            results.append(resultSet.getObject(i) + "\t");
                                            results.append("\n");
                                  catch(SQLException sqlException)
                                       JOptionPane.showMessageDialog(null,sqlException.getMessage(),
                                       "Database Error", JOptionPane.ERROR_MESSAGE);
                                       System.exit(1);
                   statList = new JTextArea(results.toString());
                   add = new JButton("Add Entry");

    Declare you variable at the class level instead of the function level, then you can see if from any method in the class.
    Paul

  • Reaching a variable from another method

    I want to "reach" the String variable 'a' from the method 'aMethod()'.
    What am I doing wrong when writing:
    String newVariable = aMethod().a;
    /Cullum

    You can't reach local variables.
    Kaj

  • Pass parameters into a method from other methods.

    I m testing  2 related applications with coded ui test and wanna pass a parameter from one method into another.
    how can i do that?
    Thank you in advance.

    Hi mah ta,
    Could you please tell us what about this problem now?
    If you have been solved the issue, would you mind sharing us the solution here? So it would be helpful for other members who get the same issue.
    If not, please let us know the latest information about it.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Retreive int variable from other pages.

    Hi,
    My program is something like this:
    Content.jsp
    <script type="text/javascript">
    function clicked2()
    var x2;
    for (var i = 0; i < form1.radio.length; i++)
    if (form1.radio.checked)
    x2=(form1.radio[i].value );
    document.form2.hiddenTextBox.value = x2;
    </script>
    <%int i=0;
    for(int l=1;l<=(Ress.size()/4);l++){ //Ress is my vector of results
    %>
    <tr>
    <td width="10%">
    <form method="get" name="form1" action="Update.jsp">
    <fieldset>
    <input type="radio" name="radio" value="<%=l%>">
    </fieldset>
    <input type=submit name="submit" value="Update" onclick="clicked2()">
    </form>
    <br><br>
    <form name="form2" method="get" action="content.jsp">
    <input type=submit name="submit" value="Delete" onclick="clicked2()"><br>
    <input type="hidden" name="hiddenTextBox"><br>
    </form>
    <br>
    <% int y2 =0;
    if(request.getParameter("submit") != null){
    y2 =Integer.parseInt(request.getParameter("hiddenTextBox"));
    session.setAttribute("num",new Integer(y2));
    //For deleting data
    String Result="";
    Result=mb1.deleteRow(y2);
    if (Result.trim().toLowerCase().equals("deleted")){
    out.println("Deleted from the database");
    }else{
    out.print(Result);
    }%>
    update.jsp
    <%Integer i1=(Integer) session.getValue("num");
    int i2=Integer.parseInt("num");%>
    <td width="65%">
    <input type=text name="textno" value="<%=i2%>">
    </td>
    <%String first=request.getParameter("textfirst");
    String middle=request.getParameter("textmiddle");
    String design=request.getParameter("textdesig");
    String dept=request.getParameter("textdept");
    String Result="";
    Result=mb1.Updating(first,middle,design,dept);
    if (Result.trim().toLowerCase().equals("done")){
    out.println("Updated");
    //response.sendRedirect("content.jsp");
    }else{
    out.print(Result);
    }%>
    I am getting null value error when I click on update button for update.jsp.I know it's a looooong one.Sorry for taking u r time.Plz help. I am just submitting the abstract.

    "private static double area (int radius, final double pi)"
    final double pi? as the method parameter? ROFLHAHAHAHAHAHAHAHAHAHAHA
    That made my day.
    As for your question, make range_1 a global variable, in other words, declare it outside your main method
    Something like
    public class gary{
    int range_1;
    public static void main (String afgfg[]){
    range_1=//something;
    private static double area (int radius)
    radius = range_1
    return radius * radius * 3.14

  • Reading variables from a shell script

    i was wondering if it is possible to enter variables from a shell script that an sql file can use:
    ex:
    shell script file
    #!/bin/ksh
    stty -echo
    read pwd?"Enter password for user: "
    echo
    stty echo
    read var?"Please enter value for variable: "
    echo
    $ORACLE_HOME/bin/sqlplus user/$pwd @TEST.sql
    sql file TEST.sql
    set serveroutput on
    set verify off
    spool out.log
    update table set parameter_value = '$var' where parameter_name = 'X';
    commit;
    exit;
    spool off;
    i tried that and it seems its updating my table with "var" and not what the user entered that is the bind variable $var
    am i missing something?

    if user hits enter (which means null) can the program
    not end and ask the user to enter another value?Try this way :
    while :
    do
            echo -n "Please enter value for variable: "
            read VAR
            if [ "$VAR" ]; then
                    break
            else
                    continue
            fi
    done

Maybe you are looking for

  • User-Exit/Badi for F-47/F-58

    Hi All, I have a developed a custom workflow for f-47 (vendor down payment request). Now whenever the document is approved/rejected the status is stored in a custom ztable. This document is posted in f-58. My requirement is whenver the document is re

  • Problem switching from AP-specific to Group-specific VLAN mapping

    Hello. Some days ago, I updated our 5508 WLC to software version 7.5.102.0. With that version, it should be possible to have a VLAN mapping specific for a Flexconnect group that is set within Flexconnect Group settings. I did that for all my Flexconn

  • New Podcast Not Showing Up In Searches

    I received approval for a new video podcast form the iTunes store about two weeks ago, but the show still does not show up on searches in the itunes store. The link to the podcast works fine, but it doesn't seem to exist when searched. Anyone have an

  • EP 60 SP2 Patch 4 lastest hotfix

    Hi everybody, I need download the lastest hotfix for my EP installation. I have read in the notes 580289 and 716750 the way for adquire it but I don't find it in the path that notes say. Can anybody say me where I can get that hotfix? I need it for e

  • Cl_gui_alv_tree and RH_STRUCT_GET and result_struc

    Hi everyone The FM RH_STRUCT_GET returns a table , result_struc, with an estructure . How can we use this table for create an alv grid tree control ? Thx