Accept input from commandline

Hi,
I have an sql file with multiple accept statements.
I would like to run this script from the DOS commandline, and supply the script with values for the accept statements.
How can I do this? (I do not want to alter the sql-file for this)
Regards,
HJH

I have an sql file with multiple accept statements.
I would like to run this script from the DOS commandline, and supply the script with values for the accept statements.
How can I do this? (I do not want to alter the sql-file for this)Create text file and put one value per line in proper order. For example, you have the following script script.sql :
accept V1 char prompt 'Enter value for V1:'
accept V2 char prompt 'Enter value for V2:'
prompt Your input : &V1 &V2
exitText file values.txt can be the following:
ABC
DEFThen use the following syntax:
sqlplus.exe /nolog @script.sql < values.txt

Similar Messages

  • PC as a bluetooth Device and accept input from other devices

    I need to set my PC up as a bluetooth device by use of a bluetooth dongle connected to my PC. I need to have a program running on my PC that will detect other bluetooth devices and connect with them, accept input from them. Please help me do this. anyone got code for this? Thank you a gazillion in advance !! :)

    There's no way to do is with standard Java as far as i know. You'll have to use JNI to use native libraries.

  • Accept input from Shell script in sql*plus

    Hey! Guys..
    i need the following info.
    I am running a shell script from sql*plus. I need to accept a value from shell script into my .sql file.
    thanks..
    Harsh.

    prompt for input, pass to another shell
    # contract_status_prompt.sh
    read udate?"Enter week-ending date in format dd-mmm-yyyy: "
    contract_status_update.sh $udate >$FDWLOG/current/contractstatusupdate`date +%d%h%y`.log
    echo `date`
    # End contract_status_prompt.sh
    Read the variable passed and use in SQLPlus:
    # contract_status_update.sh
    echo "Running contract_status.sh"
    echo "create records for contract_status"
    echo `date`
    echo " "
    echo " date used is "; print $1
    echo " "
    sqlplus <<exit
    @$FDWSQL/sqlparms
    set time on
    prompt *** Set contract_status_period ***
    update contract_status_period
    set period_date = '$1';
    commit;
    exit
    etc.

  • Accepting input from user

    Can anyone tell me that once a program has prompted a user for input (causing the program to pause), is there a way for the user to enter input and hence restart that program. I know that it can be done in JBuilder simply enough. cheers
    p.s. other than from the command line

    Hi Joe,
    Before you start running (or debugging, profiling, or code-coaching), you need to check a box in the project settings dialog. In the Project Settings dialog, select Runner - Options on the left and then check the "Allow Program Input" check box (at the bottom of the panel).
    When you start running (etc), the log window will contain a text field labeled "Input:" where you can enter program input (it's at the bottom of the log window).
    -Liz

  • Java programs don't accept input from German Microsoft keyboard on Mac OS X

    Hi everyone,
    I use Microsoft's Natural Ergonomic Keyboard 4000 with a German layout and the current IntelliType Pro driver on a Mac (OS X 10.5).
    When activating the NEK 4000-specific German keyboard layout supplied with IntelliType Pro for Mac, Java programs cannot recognize keyboard inputs anymore. They can again as soon as I switch back to the standard German keyboard layout provided by Apple with OS X 10.5. However, this layout does not match the characters printed on the NEK 4000.
    This phenomon is limited to Java programs running on OS X with the IntelliType Pro's specific German keyboard layout activated. It does not occur with native OS X programs. Therefore, the problem could result from Microsoft's IntelliType Pro driver for OS X, Sun's Java Virtual Machine (in OS X), or Apple Mac OS X.
    Could a Sun employee please take a look at this issue?
    I am more than willing to provide the respective log files if this was needed.

    arne2 wrote:
    Sun's Java Virtual Machine (in OS X), Apple, not Sun, is the source of the VM on that OS.
    Apple probably gets it from Sun but still Apple is responsible for it.

  • Does Device Central accepts input from Flash Catalyst?

    I'm a newby, and thinking of buying CS5. But I first want to know if I can check in Device Central if the SWF's and RIA's from Catalyst function properly on all kinds of phones.
    Is that possible??
    Gr Willem

    Flash Catalyst produces content based on Flash Player 10. So only phones that are capable of displaying Flash Player 10 or higher content could run the project in their phone's browser. Currently the Flash Player 10.1 plugin for mobile is in beta. For more information on that visit http://labs.adobe.com/wiki/index.php/Flash_Player_10.1_for_Android
    My Android phone has not been upgraded to FroYo, so I can not test this. Given the nature of mobile development and the current weight of the Flex Framework, I would not recommend this as a solution for anything other than initial proof of concepts.
    Hope that helps!

  • Adobe apps stop accepting input from my keyboard(s)

    This happens irregularly in Photoshop, Illustrator and the old GoLive CS. I will have a dialog box open and nothing happens when I type into a text field. The only solution is to use the mouse to close windows and quit the program. I have the same preferences on two computers because I copy my documents folder from desktop to laptop when on extended trips.
    This happens on all sorts different keyboards (Apple aluminum and Kensington extended for my 2008 Mac Pro, built-in and Logitech keyboard for my 2008 MacBook. I am currently using Leopard, and these are CS2 apps. But the fact is, it's been a problem for years.
    It's really annoying. Any suggestions to solve it, aside from upgrading to CS4?

    CS and CS2 are not supported in Leopard and will never be supported. If they work thank your lucky stars.
    Also CS and CS2 are written for PowerPC Macs and are not native to the new Intel Macs so they must run in Emulation mode (known as Rosetta).
    If you really need these apps I suggest you get CS4 which is native to the Intel Chip or move back to your Power PC Mac.

  • MBP won't accept input from keyboard seemingly at random

    Recently (the past couple of months) I have been having this weird problem with my 2008 MBP. I will try to input something using the keyboard (type in a URL in the browser, type in my name and password to give my kid extra time on parental controls, type a reply on a message board), and I can't type anything. I hear that little bong, bong at each keypress, like I am doing something wrong, and nothing appears. I will have to close and reopen Firefox (usually works), or just restart my computer.
    Has anyone else had this kind of thing happen? It happens so randomly I haven't been able to guess what might be causing it. Thanks.

    This is a bit of a wild guess.  Try a PRAM reset.  It can do no harm.
    http://support.apple.com/kb/HT1379
    Ciao.

  • Mac Mini fails to accept input from aluminum keyboard during boot.

    This is unbelievable. Support knew nothing of this. I tried ⌥, ⌘-S, ⌘-V, ⌘-⌥-P-R, and nothing. SUpport thought my keyboard was broken and was suggesting I take to the Apple Store. This is utterly mazing that people could be left without any recourse in trying to troubleshoot their Macs if they did not have another keyboard lying around. I wonder what the percentage of users is that have extra non-aluminum keyboards lying around. I suspect not high.

    This has been a known issue since the release of the Alu keyboards, and there is absolutely no doubt that Apple do know about it - I'm aware of a number of reports that have been submitted to them on this issue, and there has been a significant level of discussion about it here (and elsewhere). Given the time that has passed since it was first reported, it seems pretty obvious that Apple either can't, or don't intend to, fix the issue since they have had plenty of opportunity to revise either the keyboard or the mini.
    That said, this is sadly not the first time an Apple support worker has indicated no knowledge of a commonly known issue when a customer has called. It doesn't indicate anything much more than that either the individual worker was not aware of the problem, or couldn't find mention of it in the standard script. I'm not surprised that you were therefore given the standard fallback of taking the item to an Apple Store, but there is little excuse in the end to these people either not being correctly informed, or sufficiently monitored that cavalier responses to customers are better discouraged.
    Boece makes the point that almost any USB keyboard will suffice in the circumstance that you need to modify the boot sequence on your mini, and sad to say that remains the only real fix. The Alu keyboard is an excellent device, but is not fully compatible with a number of Mac systems.

  • Accepting input in PL/SQL

    My requirement is Accepting Input from KeyBoard in the LOOP PL/SQL Block.
    Becasue of PL/SQL constraints I am not able to accept value in the loop
    except the first time. Please advice me is there any other options in PL/SQL
    to accept input from the keyboard in the loop.

    I'm not sure how you can do this, perhaps someone else does.
    I suggest writing a Shell Script or Batch file which accepts the input and then runs SQL*Plus and your script with arguments.
    Good Luck,
    Eric Kamradt

  • How to accept user inputs from  sql script

    I want to create Tablespace useing sql script , but the location of the data file I need accept from user . (to get the location of the data file ) .
    How can I accept user input from pl/sql .
    Example :
      CREATE TABLESPACE  TSPACE_INDIA LOGGING
         DATAFILE 'H:\ORACLE_DATA\FRSDB\TSPACE_INDI_D1_01.dbf'
         SIZE 500M  AUTOEXTEND ON NEXT  1280K MAXSIZE UNLIMITED
         EXTENT MANAGEMENT LOCAL;here I need to accept location of the datafile from user ie : 'H:\ORACLE_DATA\FRSDB\TSPACE_INDI_D1_01.dbf'

    Hi,
    Whenenever you write dynamic SQL, put the SQL text into a variable. During development, display the variable instead of executing it. If it looks okay, then you can try executing it in addition to displaying it. When you're finished testing, then you can comment out or delete the display.
    For example:
    SET     SERVEROUTPUT     ON
    DECLARE
        flocation     VARCHAR2 (300);
        sql_txt     VARCHAR2 (1000);
    BEGIN
        SELECT  '&Enter_The_Path'
        INTO    flocation
        FROM    dual;
        sql_txt :=  'CREATE TABLESPACE SRC_TSPACE_INDIA LOGGING
         DATAFILE' || flocation || ' "\SRC_TSPACE_INDI_D1_01.dbf" ' || '
         SIZE 500M  AUTOEXTEND ON NEXT  1280K MAXSIZE UNLIMITED
         EXTENT MANAGEMENT LOCAL ';
        dbms_output.put_line (sql_txt || ' = sql_txt');
    --  EXECUTE IMMEDIATE sql_txt;
    END;
    /When you run it, you'll see something like this:
    Enter value for enter_the_path: c:\d\fubar
    old   5:     SELECT  '&Enter_The_Path'
    new   5:     SELECT  'c:\d\fubar'
    CREATE TABLESPACE SRC_TSPACE_INDIA LOGGING
         DATAFILEc:\d\fubar
    "\SRC_TSPACE_INDI_D1_01.dbf"
         SIZE 500M  AUTOEXTEND ON NEXT  1280K MAXSIZE
    UNLIMITED
         EXTENT MANAGEMENT LOCAL  = sql_txt
    PL/SQL procedure successfully completed.This makes it easy to see that you're missing a space after the keyword DATAFILE. There are other errrors, too. For example, the path name has to be inside the quotes with the file name, without a line-feed between them, and the quotes should be single-quotes, not double-quotes.
    Is there some reason why you're using PL/SQL? In SQL, you can just say:
    CREATE TABLESPACE SRC_TSPACE_INDIA LOGGING
    DATAFILE  '&Enter_The_Path\SRC_TSPACE_INDI_D1_01.dbf'
    SIZE 500M  AUTOEXTEND ON NEXT  1280K MAXSIZE UNLIMITED
    EXTENT MANAGEMENT LOCAL;though I would use an ACCEPT command to given a better prompt.
    Given that you want to use PL/SQL, you could assign the value above to sql_txt. If you need a separate PL/SQL variable for flocation, then you can assign it without using dual, for example:
    DECLARE
        flocation     VARCHAR2 (300)     := '&Enter_The_Path';The dual table isn't needed very much in PL/SQL.
    Edited by: Frank Kulash on Jan 10, 2013 6:56 AM

  • How to change HDMI port settings from output to input to accept signals from cable/sate​llite box?

    I have a new dv8t Entertainment PC with the HP Integrated HDTVHybrid Tuner.  The instruction manual provides 2 ways to connect the laptop to a cable/satellite box:  (1) coax/rf; or (2) HDMI.  The coax is a no-brainer; got it up and running in 10 minutes.  However, I am unable to get it to work connecting the HDMI cable, as the HDMI port on the laptop appears to be stuck in output mode.  How do I change the configuration of the HDMI port to "input" so that it can accept signals from my cable box?

    Thank you Grant for the quick response. Well, it seems I don't know what I'm doing.
    So, Mac Pro doesn't have any video INPUTS just Outputs. CHECK.
    That is correct I have a six-input-port-selector with one input (SWITCH C2G). CHECK.
    What I want is to be able to toggle through the inputs from the HDMI Switch C2G. That way I can use all my devices (Mac Pro, Xbox, PS3, Cable Box) with these monitors.
    Since the Switch C2G only has one OUTPUT Slot, I'm thinking I just need to connect the monitors to the Switch C2G Output slot by using a 2 to 1 HDMI Adapter, but wouldn't I lose the true potential of these monitors by not connecting them directly to the Mac Pro?
    Currently, I have the monitors hooked up with Thunderbolt/Mini Display Adapters to the Mac. So I guess I would just have to run just one HDMI with Thunderbolt/Mini Display from the Mac to the Switch C2G, and connect the other devices to the Switch as well.
    Jeez. Am I right? 
    What If I get an HDMI Switch with 2 Outputs instead of getting the 2 to 1 HDMI Adapter or perhaps a 4 to 2 Adapter. Heck. I'm not sure what to do here.
    I would really appreciate anyones help.
    Thank you.

  • Logic stopped accepting midi input from my devices

    hi.  logic has stopped accepting midi input from all of my midi devices for some reason that i can't figure out.  everything was fine for a while as i was able to play my midi keyboard and record with it.  now there are no midi messages being accepted.  if i open a new project everything works fine.  how do i reenable my midi devices in this project?
    thanks in advance,
    dave

    ok, nevermind, some key command must have switched my cable switcher in the environment

  • LSMW accept file from logical path?

    Dear All,
    Can LSMW designs for conversions accept file from logical path?
    The requirement is during actual conversion execution -the conversion team can store files anywhere they want, configure logical file names/paths and use our LSMWs without needing program modifications.
    Kindly let me know.
    Thanks in Advance
    Ranjan

    Hai KCR
    Using Tcode MM01 -- Maintain the source fields are
    1) mara-amtnr  char(18)
    2) mara-mbrsh  char(1)
    3) mara-mtart  char(4)
    4) makt-maktx  char(40)
    5) mara-meins  char(3)
    the flate file format is like this as follows
    MAT991,C,COUP,Srinivas material01,Kg
    MAT992,C,COUP,Srinivas material02,Kg
    AMT993,C,COUP,Srinivas material03,Kg
    MAT994,C,COUP,Srinivas material04,Kg
    MAT995,C,COUP,Srinivas material05,Kg
    goto Tcode LSMW
    give Project Name
         Subproject Name
         object Name
    Press Enter -
    Press Execute Button
    It gives 13 radio-Button Options
    do the following 13 steps as follows
    1) select radio-Button 1 and execute
       Maintain Object Attributes
    select Standard Batch/Direct Input
       give Object -- 0020
           Method -- 0000
       save & Come Back
    2) select radio-Button 2 and execute
       Maintain Source Structures
       select the source structure and got to click on create button
       give source structure name & Description
       save & Come Back
    3) select radio-Button 3 and execute
       Maintain Source Fields
       select the source structure and click on create button
       give
       first field
            field name    matnr
            Field Label   material Number
            Field Length  18
            Field Type    C
       Second field
            field name    mbrsh
            Field Label   Industrial Sector
            Field Length  1
            Field Type    C
       Third field
            field name    mtart
            Field Label   material type
            Field Length  4
            Field Type    C
       fourth field
            field name    maktx
            Field Label   material description
            Field Length  40
            Field Type    C
       fifth field
            field name    meins
            Field Label   base unit of measurement
            Field Length  3
            Field Type    C
      save & come back
    4) select radio-Button 4 and execute
       Maintain Structure Relations
       go to blue lines 
          select first blue line and click on create relationship button
          select Second blue line and click on create relationship button
          select Third blue line and click on create relationship button
      save & come back
    5) select radio-Button 5 and execute
       Maintain Field Mapping and Conversion Rules
       Select the Tcode and click on Rule button there you will select constant
       and press continue button
       give Transaction Code : MM01 and press Enter
       after that
       1) select MATNR field click on Source filed(this is the field mapping) select MATNR and press Enter
       2) select MBRSH field click on Source filed(this is the field mapping) select MBRSH and press Enter
       3) select MTART field click on Source filed(this is the field mapping) select MTART and press Enter
       4) select MAKTX field click on Source filed(this is the field mapping) select MAKTX and press Enter
       5) select MEINS field click on Source filed(this is the field mapping) select MEINS and press Enter
      finally     
      save & come back
    6) select radio-Button 6 and execute
       Maintain Fixed Values, Translations, User-Defined Routines
       Create FIXED VALUE Name & Description as MM01
       Create Translations Name & Description as MM01
       Create User-Defined Routines Name & Description as MM01
       after that delete  all the above three just created in the 6th step
       FIXED VALUE --MM01
       Translations --MM01
       User-Defined Routines --MM01
       come back
    7) select radio-Button 7 and execute
       Specify Files
       select On the PC (Frontend) -- and click on Create button(f5)
                                      give the path of the file like "c:\material_data.txt"
                                      description : -
                                      separators as select comma radiao- button
       and press enter   save & come back
    8) select radio-Button 8 and execute
       Assign Files
       Save & come back
    9) select radio-Button 9 and execute
       Read Files
       Execute
       come back
       come back
    10) select radio-Button 10 and execute
        Display Imported Data
        Execute and press enter
        come back
        Come back
    11) select radio-Button 11 and execute
        Convert Data
        Execute
        come back
        Come back
    12) select radio-Button 12 and execute
        Display Converted Data
        Execute & come back
    13) select radio-Button 13 and execute
        Start Direct Input Program
       select the Program
       select continue button
    go with via physical file
    give the lock mode as 'E'
    and execute
    Thanks & regards
    Sreenivasulu P

  • How to Get Input from Command Prompt?

    How can i get input from command prompt like
    C:\
    or linux ?
    (Here's what I use now)
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String line;
    Whlie((line=in.readLine())!= null)
    { System.out.prinln( line) ; }
    IS THERE A BETTER WAY?

    The main method within a java class accepts command line input through a String array.
    In this example args is the String array. You can access the parameters as args[0] for the first parameter, args[1] for the second parameter, etc....
    The usage for the example below would be :
    c:\EDIFormat file1 file2
    Where args[0] would equal file1 and args[1] would equal file2.
    public class EDIFormat {
    public static void main(String[] args) {
              if (args.length < 0) {
                   System.out.println("No Parameters supplied. Exiting....");
                   // open input and output files
                   EDIFiles(args[0], args[1]);
    Hope that helps!

Maybe you are looking for

  • I'm getting really frustrated and could use some help

    Hello there! I'm  not sure what happened because when I plugged in my ipod today (I have an 8g ipod touch) everything was reset to the basics in itunes. My entire library was delted. Honestly I'm not really that upset by that as I was going to change

  • IBook DVI output

    I'm trying to connect my iBook G4 12" to a DVI monitor. I'm using the VGA adapter that came with my laptop and a DVI cable that came with my monitor and both work for other applications. I am also using a small $20 VGA-to-DVI adapter. It is either th

  • Can someone help me install lightroom 5

    This is my first lightroom and I bought lightroom 5. I don't have the version 4 or 3. When I try to install is asking the serial number that I have, and also the original serial number. I don't have any. please help me

  • None of the support people speak CF, please help!

    I'm about to write a web service web app. for the 2nd time. I'm new to this but my first app. was a success so I plan to do it again. In both cases, the web services weren't written with CF. Not sure what language they used but this shouldn't be a pr

  • Macbook Air Extremely Slow/Stuck

    Dear all, A few months ago my MBA was still logged on when the battery went empty. I charged it completely, but then it was extremely slow. Sometimes it was just stuck. I then used the power button to shut it down completely. After that my MBA never