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

Similar Messages

  • 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 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 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.

  • 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 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 host command from servlet

    Hi
    I am trying to run some hostcommand/shell scripts from a servlet.Can any one tell me how to go about it.
    Rgds,
    Satya

    this is very useful, I've been looking for a long time but nobody is able to answer me, even my tutor.
    andrew

  • Is it possible to run host command from SAP environment? How do you run?

    Hi
    Is it possible to run host command from SAP environment? How do you run?
    Thank You

    Hello Subhash
    You will more details in the following thread:
    Re: How to define command for SXPG_COMMAND_EXECUTE
    Regards
      Uwe

  • Can Reports 3.0 run a host command?

    Can Reports 3.0 run a host command like in Forms 5?
    null

    Hi! Bill
    ANS: NO
    Bill Fox (guest) wrote:
    : Can Reports 3.0 run a host command like in Forms 5?
    null

  • 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

  • Host Commands from Java

    Hello everyone,
    I'm trying to run openVMS host commands via Java using the code listed below, which essentially runs the following host commands, each in turn:
    terry :== "hello"
    sho sym terry
    sho log robin4
    I've tried a few other commands as well, but the ones which assign variables (such as the terry example above), never work, either producing no output as in the example above, or if I did
    define/group "hello" terry
    would produce:
    DCL-W-NOCOMD, no command on line - reenter with alphabetic first character
    So commands that don't print anything to the screen are the ones that are causing problems (they're just setting variables or what not).
    Does anyone have any ideas as to how to get these commands working via java? I really don't know what to think..I've tried checking the format of the commands I'm trying to do, and it's not down to that - the host command I'm running is right and works if done directly.
    Please help! Thank you so much in advance.
    Robin
    import java.io.*;
    public class Host {
    public static void executeCommand(String command) {
    String s = "hello";
    String s2 = "sho log robin4";
    String s3 = "assign/system "+command+"hello"+command+" robin5";
    try {
    String[] finalCommand;
    System.out.println(System.getProperty("os.name"));
    finalCommand = new String[3];
    finalCommand[0] = "terry :== \"hello\"";
    finalCommand[1] = "sho sym terry";
    finalCommand[2] = s2;
    for(int i = 0;i< finalCommand.length; i++){
    // Execute the command...
    final Process pr = Runtime.getRuntime().exec(finalCommand);
    // Capture output from STDOUT...
    BufferedReader br_in = null;
    try {
    br_in = new BufferedReader(new InputStreamReader(pr.getInputStream()));
    String buff = null;
    while ((buff = br_in.readLine()) != null) {
    System.out.println("stdout: " + buff);
    try {Thread.sleep(100); } catch(Exception e) {}
    br_in.close();
    } catch (IOException ioe) {
    System.out.println("Error printing process output.");
    ioe.printStackTrace();
    } finally {
    try {
    br_in.close();
    } catch (Exception ex) {}
    // Capture output from STDERR...
    BufferedReader br_err = null;
    try {
    br_err = new BufferedReader(new InputStreamReader(pr.getErrorStream()));
    String buff = null;
    while ((buff = br_err.readLine()) != null) {
    System.out.println("stderr: " + buff);
    try {Thread.sleep(100); } catch(Exception e) {}
    br_err.close();
    } catch (IOException ioe) {
    System.out.println("Error printing execution errors.");
    ioe.printStackTrace();
    } finally {
    try {
    br_err.close();
    } catch (Exception ex) {}
    catch (Exception ex) {
    System.out.println(ex.getLocalizedMessage());

    User_resU wrote:
    Hello everyone,
    I'm trying to run openVMS host commands via Java using the code listed below, which essentially runs the following host commands, each in turn:
    terry :== "hello"
    sho sym terry
    sho log robin4
    1. Presumably this represents some sort of character user interface (CUI) which is console based.
    finalCommand = new String[3];
    finalCommand[0] = "terry :== \"hello\"";
    finalCommand[1] = "sho sym terry";
    finalCommand[2] = s2;
    final Process pr = Runtime.getRuntime().exec(finalCommand);
    2. This represents an executable to which you are passing command line arguments.
    This isn't a java problem because 1 and 2 are not even close to being the same.
    Java won't do anything that you cannot get the application to do itself.
    Your choices:
    1. Find a way to run the app such that it takes commands from a file. You put the commands in a file and pass that to exec()
    2. Find a way that use stdio (the CUI might represent that but there is no guarantee.) You then use exec() to start the app then use the IO streams to pass the commands to it.
    Notice that my choices do not include an option for passing as command line parameters because I am almost certain that it does not exist.

  • Host command in report

    i want to use host command in report
    but error happened
    any thing instead of host

    i use rep2excel
    i put button in report
    when a user press abutton in report appear
    report in excel format
    and i put this code
    procedure U_1ButtonAction is
    v_conn_str varchar2(50) := 'scott/ghrbia'; --To be changed
    v_rep2excel_path varchar2(100) := 'C:\thepath\rep2excel.exe';--To be changed
    v_cache_path varchar2(100) :='c:\Temp\';--To be changed
    v_random_name varchar2(100);
    v_cmd_rwrun varchar2(300);
    v_cmd_rep2excel varchar2(300);
    v_input_path varchar2(300) ;
    v_output_path varchar2(300) ;
    Begin
    select to_char(round(dbms_random.value(100000, 999999)))||to_char(sysdate,'DDHH24MISS')
    into v_random_name from dual;
    v_input_path := v_cache_path||v_random_name||'.htm' ;
    v_output_path := v_cache_path||v_random_name||'.xls' ;
    v_cmd_rwrun := 'RWRUN60 REPORT=D:\work\banner\report\excel.rdf USERID='||v_conn_str;
    v_cmd_rwrun := v_cmd_rwrun || ' DESTYPE=FILE DESFORMAT=HTML' ;
    v_cmd_rwrun := v_cmd_rwrun || ' DESNAME='||v_input_path||' batch=yes';
    v_cmd_rwrun := v_cmd_rwrun || ' P_dept='||:dept_id;
    --:cmd1 := v_cmd_rwrun ;
    host(v_cmd_rwrun);
    v_cmd_rep2excel:='cmd /c start '||v_rep2excel_path||' -i:'||v_input_path ||' -o:'||v_output_path ||' -open' ;
    -- :cmd2 := v_cmd_rep2excel;
    HOST(v_cmd_rep2excel);
    end;

  • Host command from D2K Forms

    Am calling the sql loader (sqlldr73) using HOST command from D2K Forms 4.5.
    my code has following sequence,
    <sequence of stmts 1>
    Host(....);
    <sequence of stmts 2>
    the stmts(<sequence of stmts 2>) following the call to HOST commant should be executed only after successful execution of the sql loader.
    curently the sql loader and stmts(<sequence of stmts 2>) are running parallely
    Is there any work around?

    Hi,
    Better way to do it would be to write a batch / shell script with the sequence of statements you want to execute and call the batch file using the host command.
    Regards,
    Arun

  • Problem running a concurrent program from Reports

    Hi,
    I've come across a problem while running a concurrent program from Reports. The report is executed OK and at the end, I call a concurrent program by firing fnd_request.submit_request. I catch then the req_id returned and it gives me 0. I tried to replace the concurrent program, which is a UNIX shell script, with just a simple script that echos "hello", but anyway, I get 0 as return value from fnd_request.submit_request.
    The next step I tried to set apps_initialize with proper vUSER_ID, vRESP_ID and vRESP_APPL_ID, but did not get away with that. My last try was to hardcode vUSER_ID to a sysadmin user, in case this was rights-related issue but did not work as well.
    Am now looking into a possibility of actually getting the error, why it failes. I found some posts where FND_MESSAGE.RETRIEVE and FND_MESSAGE are used but this apparently does not work under Reports (am using reports builder v. 9.2.0.4.0).
    Any suggestions how to solve this issue?
    Thanks,
    David Lacina.

    Hi,
    Make sure that the concurrent program you are calling exists (case sensitive) and is enabled.
    Create a PL/SQL package and use that to call your request - the you'll be able to use fnd_message.
    Regards,
    Gareth
    Blog: http://garethroberts.blogspot.com/

  • Discoverer Report: How to find Business Area name from Report Name.

    Hi
    I opened a report in Disco Desktop 4 -> Resonsibiolity --> Report Name.
    So I know Report name but don’t know which Business Area it belongs to.
    How to find Business Area Name from Report Name?
    Cheers
    Vijay

    Hi,
    There is no relationship between reports and business areas. Each report can be built from many folders. Each folder can be in many business areas.
    However you can try the following SQL which may give you the result you want for an v5 EUL. You will have to modify for Discoverer 4 EUL:
    select distinct doc_name, obj.obj_name folder_name, bas.ba_name
    from eul_us.eul5_documents doc
    , eul_us.eul5_elem_xrefs xref
    , eul_us.eul5_expressions exp
    , eul_us.eul5_objs obj
    , eul_us.eul5_ba_obj_links bol
    , eul_us.eul5_bas bas
    where xref.ex_from_id = doc.doc_id
    and doc.doc_name = &your_report
    and xref.ex_to_id = exp.exp_id
    and obj.obj_id = exp.it_obj_id
    and bol.bol_obj_id = obj.obj_id
    and bas.ba_id = bol.bol_ba_id
    Rod West

Maybe you are looking for

  • Upgrading Adobe Acrobat 5.0 to 9 on Vista

    I just bought a new computer with Windows Vista. I have an old Adobe Acrobat 5.0 CD which I was limping along with just fine... until now. Apparently Vista doesn't like 5.0. So, I purchased Adobe Acrobat 9... the upgrade. I cannot find any mention of

  • App store version same one sold in Apple stores?

    Is the $80 version of Aperture offered in the App Store the same as the $199 version sold in the Apple stores or is is a modified (stripped down) version?

  • XML Question: What is "NDATA"?

    I saw a line in an XML file: <!ENTITY picture SYSTEM "http://www.somesite.com/somePic.gif" NDATA GIF> What's the "NDATA". What's the use of it.And how to define it. By the way, What's the use of NOTATION?

  • JINI problem or not  !

    I have developed an shared object for JINI in sorias 5.9. The SO(shared object) does not work at JINI environment, results in "Segmentation fault". that is to say, The java container program calls the SO and then crushes to fail, but The test C++ con

  • Back to my mac doesn't work with Cable modem

    I have at home Cable modem and a Airport Extreme, both use NAT to distribute internet, so it seems even if I connect the cable modem direct to my home Mac (without the Airport) that the Back to my mac doesn't work. Can somebody tell me how can I turn