How to run a DOS command from an Oracle form.

How can I run a DOS command from an Oracle form (i.e. open the calculator located at c:\windows\system32\calc.exe)?

first of all get the environment variable for the c:\windows\system32 direcotry for any of the windows
you can use get variable from the ora env package
now cancat the system32 variable with the calc.exe string
now pass the string with host command as parameters
this process will work for all type of windows.

Similar Messages

  • How to run multiple DOS commands from a single Webutil Client_Host session?

    Hello all,
    I have a requirement where I need to create an interface with SVN from Forms for basic checkin-checkout of files.
    So, I've been trying to use webutil client_host to open a command line session and issue svn commands.
    For svn, sometimes I need to give multiple commands like change to a particular directory and then run an svn command.
    But client_host takes in only one command at a time and I'm unable to issue a series of DOS commands to perform
    a particular task.
    Is there a way to do this?
    Pls suggest.
    Regards,
    Sam

    First your original question... You can put more than one DOS command on a single line, simply separate each command with an ampersand (&). For example:
    mkdir c:\abc & cd abc & dir*
    Regarding your concerns about performance, well that would depend on exactly what you mean. Using CLIENT_HOST (or HOST on the server) simply opens a shell (DOS in this case) then passes your command to it. The performance of performing this action really isn't measurable. Basically you are just pressing a button and you should get a near immediate action. As for the performance of executing each command, that has nothing to do with Forms. Once the command is passed to the shell, the rest is a function of the shell and whatever command you passed.
    Having said that, if you were to write something sloppy like a loop (in pl/sql) which called CLIENT_HOST lots of times repeatedly, then yes there would be a performance problem because the pushing of the button will cause an exchange to and from the server and each cycle in the loop will do the same.
    So the answer to how performance is impacted will depend on what exactly you need to accomplish. If it is a single call to CLIENT_HOST, this should be fine.

  • How to run a openssl command from a java program

    Hi All
    Please suggest on how to run a openssl command from a java program.
    I am using this
    Runtime runtime = Runtime.getRuntime();
    runtime.exec("openssl pkcs8 -inform der -nocrypt test.der result.pem");
    This is suppose to take test.der as input and create result.pem.
    There are no errors but the file result.pem isnt created.
    Thanks in Advance

    First off is that openssl command correct? Should it be this instead:
    openssl pkcs8 -inform der -nocrypt -in test.der -out result.pem
    Try out your openssl command within a command prompt so that you know that it works ok. I think the command line you specified waits on stdin (well it does for me).
    After that.....
    runtime.exec creates a Process object. If you do this:
    Process openssl = runtime.exec("....")
    then you can examine the return code from openssl to see the exit code - for instance if the input file does not exist then exit = 1. You can test for this with Java
    Alternatively you could get the stderr from the process and look inside it - if it is 0 length then all is good, if it has some text in there then it has likely failed. You could then throw an exception and include the stderr output in the exception messgae. You may need to experiment with this, runnig it first when openssl is happy then running it again when openssl is upset.
    M

  • How to call a COM object from an Oracle Form?

    Hi All,
    Pls advice. How to call a COM object from an Oracle Form?
    Thanks.

    try asking the "Form" forum

  • How can I run a dos command from java on windows 98, 95?

    The usage of cmd.exe in the java program to run a dos command on windows 98. 95 doesn't work as the equivalent command is command.exe
    But using the command.exe in the java program makes my program to hang.

    hi,
    As u mentioned, u cannot use the cmd.exe in win9x environment as cmd.exe is specific to windows NT, you can use the command.exe without any hitches.
    for eg
    java.lang.Runtime.getRuntime().exec("start command /K a.bat"); should run the batch file a.bat..
    if the problem persists, try posting the snippet of code that you are using.
    cheerz
    ynkrish

  • How to run a Dos batch from SSIS based on SQL table content

    Hi,
    I have a very simple package with an execute sql task. This task checks if a certain record is present in the DWH or not. This record is always a row in a table where the task checks if the time of the latest data import equals today's date. I would like
    to extend tis package so that if that record exists,so the latest data imoprt was succesfull in the DWH then package runs a .BAT file from the file system, if the reocrd is not present do nothing.
    Is there a TSQL command to run a .BAT file from my file system? I did  not really find my answers on the net so any help is appreciated
    Thanks

    Hi Vaibhav,
    Thanks, but variable still does not want to pick up the value from the SQL query.
     I changed the SQL statement (it counts how many values with 4 days lag are in the FTDA column):
    and changed the Result set:
    Created a variable:
    Set precedence constraint:
    and still the variable takes value 0,which is the default.
    Any ideas?
    Thanks
    Check if mapping is proper and datatypes of resultset vs variable is same.
    Then it will work fine
    You can also put a breakpoint on post execute of execute sql task and check the variable value once it reaches there.
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How to run a HOST command from Report 2.5

    Hello everybody,
    I want to pass an unix command from a Report. I am running the report (Report 2.5) on an Unix server and I want to pass a unix host command inside the Before Report Trigger of the report. But Report2.5 is not recognising the HOST built-in. Is there is any way around?
    Thank in advance.
    Samujjwal Basu

    First off is that openssl command correct? Should it be this instead:
    openssl pkcs8 -inform der -nocrypt -in test.der -out result.pem
    Try out your openssl command within a command prompt so that you know that it works ok. I think the command line you specified waits on stdin (well it does for me).
    After that.....
    runtime.exec creates a Process object. If you do this:
    Process openssl = runtime.exec("....")
    then you can examine the return code from openssl to see the exit code - for instance if the input file does not exist then exit = 1. You can test for this with Java
    Alternatively you could get the stderr from the process and look inside it - if it is 0 length then all is good, if it has some text in there then it has likely failed. You could then throw an exception and include the stderr output in the exception messgae. You may need to experiment with this, runnig it first when openssl is happy then running it again when openssl is upset.
    M

  • How to run O/S command from SQL * Plus.

    Hi,
    Can i run O/S commands, say copy or move, from SQL * Plus prompt? If yes, what is the command.
    Thanks.

    hi,
    or you can try the following
    slq > !
    and then your command
    rgds
    Alan

  • Running a dos command from a java application

    hello,
    I'm trying to execute a batch file from a java application. I tried with:
    try
    Process proc=Runtime.getRuntime().exec("fop -fo "+iXmlFoFile+" -
    svg "+SvgFileName);
    }catch (IOException e){System.err.println("Error in conversion of
                               the Xml FO file into Svg file: "+e);}
    and with:
    try
    Process proc=Runtime.getRuntime().exec("cmd ./c fop
    -fo "+iXmlFoFile+" -svg "+SvgFileName);
    }catch (IOException e){System.err.println("Error in conversion of
                the Xml FO file into Svg file: "+e);}
    but i have a IOException: CreateProcess: .... error=2
    When I try these line to launch a .exe file it works but not with a .bat file.
    I also tried:
    String execstr = "fop -fo "+iXmlFoFile+" -svg "+SvgFileName;
    String [] commandArray = { execstr };
    try {
    Runtime.getRuntime().exec(commandArray);
    } // end try
    catch ( Exception e ) {
    System.out.println( e.getMessage() );
    e.printStackTrace();
    }// end catch
    but i got the same exception in java.lang.Win32Process.create
    What did i do wrong?

    Your execution string is a bit more that I want to figure out, but here are a couple ideas:
    Is the working directory of any importance? If so you'll need to set that when you do your exec()
    I think I remember reading something about batch files that couldn't be kicked off via this method. Perhaps you need to execute the string "start mybatchfile.bat". Seems like you need to do something like that to get a command interpreter to run your batch file.

  • How to run Unix Host commands from Database Triggers?

    Hi
    I need to create few directories in the Unix O/s under a specific directory (From a Database Trigger). And the directory names will be determined in the DB Trigger based on the data.
    I hope someone would have come across a requirement like this and will be able to help me out.
    Thanks.
    Mohan

    Hi Christopher
    How is it possible to use System calls from Triggers. Is it possible to use Runtime Libraries in DB Triggers.
    Thanks
    Mohan
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Christopher Racicot ([email protected]):
    Try using the system calls available in
    the C runtime library by calling an external
    C procedure from the trigger. We will be
    enhancing the support in UTL_FILE to address
    issues like this in an upcoming release,
    but for now an external procedure should
    do the trick.<HR></BLOCKQUOTE>
    null

  • How to open or call Excel from an Oracle Form in Apps11i

    I have a custom form in Apps 11i from which I need to be able to open an Excel spreadsheet. I'm aware that it is possible to a spreadsheet that is available on the local drive from a form, but can it be done from Applications ?

    If you do by yourself, you may call report in excel format, as of editing and saving back to database, you may need think other ways.
    webutil may be hhepful.

  • How to run an XML Report from Oracle Forms 10G

    Hello Friends,
    I am in need of showing a xml report output through a button press trigger in Oracle Forms10G.
    I have designed the report in XML Publisher and the report looks fine.I found few scripts useful in running the Oracle Report from Oracle forms10G like Run_Report_Object.But I am not aware of any script that could run a XML report and show the output directly from a Form.
    All I want is to run a XML report from an Oracle Form with a button press trigger and show the output in an html version.
    Can this be achieved?
    If so, Kindly advise as this is an immediate work.
    Regards,
    Badrul.

    Hi,
    If I am not wrong the XML publisher is same as BI publisher ...
    There is one document which explains how to integrate using web service
    You want to check this
    http://www.oracle.com/technology/products/xml-publisher/docs/Forms_BIP_v22.pdf
    or you can also try web.show_document ..

  • How 2 call a report 10g from a parameter form 10G

    Hello,
    pls. i need steps ,or docs how 2 run a report 10g from a parameter form ;
    Is it requireD for the Parameter form to call a report an Application Server no* ???*
    i had a previous  experience with the code due to run the report as follows:_
    DECLARE
       PARAM_ID                                 PARAMLIST ;
       PARAM_NAME                           VARCHAR2(30) := 'REPORT_PARAMETER';
       ALRT                                         NUMBER;
       ERR_TXT                                   VARCHAR2(1000);
       repid                                         REPORT_OBJECT;
       v_rep                                        VARCHAR2(100);
       v_REP_SERVER_NAME       VARCHAR2(200);
       v_ip                                          VARCHAR2(100);
    BEGIN
           PARAM_ID := GET_PARAMETER_LIST(PARAM_NAME);
           IF NOT ID_NULL(PARAM_ID) THEN
              DESTROY_PARAMETER_LIST('REPORT_PARAMETER');
           END IF;
           v_REP_SERVER_NAME := REP_SERVER_NAME;
    BEGIN
            SELECT  PARAMETER_VALUE
            INTO   v_ip
            FROM GENERAL_FIXED_PARAMETERS
           WHERE PARAMETER_ID = 'REPORT_SERVER_IP';
           EXCEPTION
           WHEN OTHERS THEN   
           Message ('OTHERS' || SQLCODE || ' And ' || SQLERRM);
           Message ('OTHERS' || SQLCODE || ' And ' || SQLERRM);     
    END;
           PARAM_ID := CREATE_PARAMETER_LIST(PARAM_NAME);
           ADD_PARAMETER(PARAM_ID,'PARAMFORM',TEXT_PARAMETER,'NO');   
           ADD_PARAMETER(PARAM_ID,'COPIES',TEXT_PARAMETER,:COPIES);
           ADD_PARAMETER(PARAM_ID,'P_DISPLAY',TEXT_PARAMETER,:DESTYPE);
           ADD_PARAMETER(PARAM_ID,'DESFORMAT',TEXT_PARAMETER,'pdf');
           ADD_PARAMETER(PARAM_ID,'group_id',TEXT_PARAMETER, :group_id);
             repid := find_report_object('WH_R01_GRP_ITEM');
             SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,v_rep_server_name);     
             v_rep := RUN_REPORT_OBJECT(repid,PARAM_ID);
      WEB.SHOW_DOCUMENT('http://'||V_IP||'/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?server='||v_REP_SERVER_NAME,'_blank');
    --  http://server_name:8889/reports/rwservlet?report=rep_name.rdf&paramform=yes&destype=CACHE&desformat=htmlcss&userid=id/pass@conn
    END;notice here the value of V_IP it is retrieved from the following table desc...
    The table desc   GENERAL_FIXED_PARAMETERS that i select from the values are as follows:_
    SQL>   DESC GENERAL_FIXED_PARAMETERS;
    Name                                      Null?    Type
    PARAMETER_ID                                       VARCHAR2(200)
    PARAMETER_VALUE                                    VARCHAR2(200)
    PARAMETER_DESC                                     VARCHAR2(200)
    MODULE                                             VARCHAR2(200)it's stored value is as follows:
    SQL>  select * from GENERAL_FIXED_PARAMETERS;
    PARAMETER_ID   PARAMETER_VALUE  PARAMETER_DESC   MODULE
    REPORT_SERVER_IP     rep_oraas_OracleAs_10gNotice here the value of the PARAMETER_VALUE is a string ; as if it's a generic value to be applied on any REPORT_SERVER_IP this value ...
    Where Should i retrieved or Get ???
    That was long time i can't remember pls help me 2 run my report what should id
    i searched the google but there is a missing link can u help and guide me it's urgent pls.
    if needed 2 start oc4j for reports , setting pathes ,fonts, enviroment file etc.
    The report object's property in the object navigator is as follow:_
    + Oracle Developer Integration node :
    File name : My_Report_name
    Execution Mode: Runtime
    Communication Mode : Synchronous
    Data Source data block :NULL
    + Reports node:
    Report Destination Type : FileThanks in advance,
    Regards,
    Abdetu...

    Thanks InoL for reply,
    REPORT_SERVER_IP is not correcti had doubted but wasn't sure of it...!
    My First Question was :
    Is it requireD for the Parameter form to call a report an Application Server no ???*the answer i found is Yessss
    Regards,
    Abdetu...

  • How to run non-customised report from command prompt to gen trace file?

    Hi
    how to run non-customised report from command prompt to gen trace file?
    EBS R12 RUP6.
    RHEL5
    rgrds

    Hi,
    See (Note: 285497.1 - Rwrun.sh Does Not Generate Trace Output Using TRACEOPTS in Command Line) and/or (Note: 737445.1 - R12 Concurrent Requests Run Forever; rwrun Errors REP-50125) for the command you need to use.
    Thanks,
    Hussein

  • How to run a CMD command directly from run ?

    How to run a CMD command directly from run ?
    Like "cmd md D:\abcd". I did this before. But now I totally forgot how to do that ?
    Please help..........

    Hi,
    To add, here is the command CMD reference:
    Cmd
    Best regards
    Michael Shao
    TechNet Community Support

Maybe you are looking for