Unix shell script wont execute from ODI

Hi All.
I have an interface that calls a shell script to append a record number to a flat file. The shell script is  called by the Execute OS command action.
This works fine in our dev environment as we have migrated the code to a new environment it no longer works.
The error I'm getting from the session task is "wrong process code: 127" and from the session step
ODI-1226: Step Append Record Number into the file fails after 1 attempt
ODI-1242: Operating System command execution fails
I'n calling the shell script as below:
sh xxc_rms_append_record_number.sh
The shell is in the same directory as the agent i.e. agent/bin
Thanks in adavance
Guy

Hi ,
I assume you are using ODI 11g.
Please try / check the below steps --
1> Try to use OdiOsCommand instead of OSCommand .
2> Try to execute the shell script in the directory in the path you want to run (not from ODI)
3> Recheck the path whether you should run in that directory or not (Environment wise directory can be changed)
Thanks

Similar Messages

  • UNIX Shell Script - Maxl - executing 4 Maxl script at the same time

    Hi,
    I wrote a UNIX shell script that basically call 4 maxl script to execute at once. But it seem to executing 2 maxl and then it goes to the last script. So, script 4a,4b,4c, & 4d should execute all at the same time. But for some reason at random only two script is being executed. And then it would go to script 5. Anybody have any answer to why it's doing this? Or is it something i'm doing it is incorrect help please?
    I'm running essbase 11.1.2
    Here is my script:
    #!/bin/sh
    # Maxl script to run
    export MAXL_SCRIPT_1=/hyperion/..../script1.maxl
    export MAXL_SCRIPT_2=/hyperion/..../script2.maxl
    export MAXL_SCRIPT_3=/hyperion/..../script3.maxl
    export MAXL_SCRIPT_4a=/hyperion/..../script4a.maxl
    export MAXL_SCRIPT_4b=/hyperion/..../script4b.maxl
    export MAXL_SCRIPT_4c=/hyperion/..../script4c.maxl
    export MAXL_SCRIPT_4d=/hyperion/..../script4d.maxl
    export MAXL_SCRIPT_5=/hyperion/..../script5.maxl
    /usr/bin/sh -c "cd /hyperion/...../bin/; ./startMaxl.sh $MAXL_SCRIPT_1 "
    wait
    /usr/bin/sh -c "cd /hyperion/...../bin/; ./startMaxl.sh $MAXL_SCRIPT_2 "
    wait
    /usr/bin/sh -c "cd /hyperion/...../bin/; ./startMaxl.sh $MAXL_SCRIPT_3 "
    wait
    /usr/bin/sh -c "cd /hyperion/...../bin/; ./startMaxl.sh $MAXL_SCRIPT_4a " &
    /usr/bin/sh -c "cd /hyperion/...../bin/; ./startMaxl.sh $MAXL_SCRIPT_4b " &
    /usr/bin/sh -c "cd /hyperion/...../bin/; ./startMaxl.sh $MAXL_SCRIPT_4c " &
    /usr/bin/sh -c "cd /hyperion/...../bin/; ./startMaxl.sh $MAXL_SCRIPT_4d " &
    wait
    /usr/bin/sh -c "cd /hyperion/...../bin/; ./startMaxl.sh $MAXL_SCRIPT_5 "
    echo Done.
    Thanks,
    Mark

    Thanks!
    I just noticed that the problem was due to something *within my application*.
    I explain:
    i built an application and I want it to be activated by my script.
    I have another script running, but this is not a problem as I discovered later...
    The problem is indeed that my script activates my application, but even when my application is opened, so it succeded, it stays hanged.
    I found that the same thing does not happen with regulare applications, such as Safari or iTunes, so i narrowed down the probglem to my application...
    Is there something i should do to it?
    I checked the "scriptable" checkbox inside my application plist, but the result is still the same...

  • Unix shell script should execute (run) webI report.

    Hi
    i am new to BO.
    I have webI reports developed, can any one tell me how  to execute a webI reprot using unix sheel script.

    Hello Vijaya,
    Thatu2019s an interesting question.  BusinessObjects does not supply any native UNIX shell interfaces or scripts for running/executing Webi Reports. Not knowing what it is you are exactly trying to accomplish Iu2019ll give a very general answer.
    I have had several customers who had requirements to have external systems execute, refresh and export reports in BusinessObjects Enterprise before.  These external systems could execute a shell script so what they have ended up doing is creating generic Java applications that use the BusinessObjects BOE Java SDK. Once they had the Java application created their external application could execute a java directory or they created shell wrappers that were called.  So what you could do is create some Java applications that wrap the functionally you need and then execute those from the command line.
    With that said there is a lot of functionally built into BusinessObjects Enterprise.  If I was to know exactly what you were trying to achieve I might be able to point you in the direction of an existing product feature.
    Cheers,
    David.

  • Error while trying to execute a unix shell script from java program

    Hi
    I have written a program to execute a unix shell script in a remote machine. I am using J2ssh libraries to estabilish the session connection with the remote box.The program is successfully able to connect and authenticate with the box.
    The runtime .exec() is been implemented to execute the shell script.I have given below the code snippet.
    try {
         File file_location = new File("/usr/bin/");
         String file_location1 = "/opt/app/Hyperion/scripts/daily";
         String a_mib_name = "test.sh";
         String cmd[] = new String[] {"/usr/bin/bash", file_location1, a_mib_name};
         Runtime rtime = Runtime.getRuntime();
         Process p = rtime.exec(cmd, null, file_location);
    System.out.println( "Connected to the server1" );
    BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
    String line = br.readLine();
    while(line !=null)
    System.out.println(line);
    line = br.readLine();
    br.close();
    p.getErrorStream ().close ();
    p.getOutputStream().close();
    int retVal = p.waitFor();
    System.out.println("wait " + retVal);
    //session.executeCommand("ls");
    catch (IOException ex) {
    I get an error message
    Connected to the server
    java.io.IOException: Cannot run program "/usr/bin/bash" (in directory "\usr\bin"
    ): CreateProcess error=3, The system cannot find the path specified
    at java.lang.ProcessBuilder.start(Unknown Source)
    at java.lang.Runtime.exec(Unknown Source)
    at SftpConnect.main(SftpConnect.java:143)
    Caused by: java.io.IOException: CreateProcess error=3, The system cannot find th
    e path specified
    at java.lang.ProcessImpl.create(Native Method)
    at java.lang.ProcessImpl.<init>(Unknown Source)
    at java.lang.ProcessImpl.start(Unknown Source)
    I am sure of the file path where the bash.sh and test.sh are located.
    Am i missing something? Any help would be greatly appreciated.
    Thanks
    Senthil

    Hi, I am using a simple program to connect to a RMI server and execute shell script. I use the Runtime.exec aommand to do the same.
    The script is sh /tmp/pub/alka/test.sh /tmp/pub/alka/abc/xyz/ul ul
    The script when run from the server, gives no errors. But when ran using rthe above method in java, gives errors as follows,
    Mycode:
    String command = "/bin/sh /tmp/pub/alka/test.sh /tmp/pub/alka/abc/xyz/ul ul";
    Runtime rt = Runtime.getRuntime();
    Process proc = rt.exec(command);
    int exitVal = proc.exitValue();
    System.out.println("Process exitValue: " + exitVal);
    java.io.IOException: CreateProcess: /bin/sh /tmp/pub/alka/test.sh /tmp/pub/alka/abc/xyz/ul ul error=3
         at java.lang.ProcessImpl.create(Native Method)
         at java.lang.ProcessImpl.<init>(Unknown Source)
         at java.lang.ProcessImpl.start(Unknown Source)
         at java.lang.ProcessBuilder.start(Unknown Source)
         at java.lang.Runtime.exec(Unknown Source)
         at java.lang.Runtime.exec(Unknown Source)
         at java.lang.Runtime.exec(Unknown Source)
         at DecryptTest.main(DecryptTest.java:18)
    Can anyone please help

  • Error while executing unix shell script from java program

    Hi All,
    I am trying to execute unix shell script from a java program using Runtime.execute() method by passing script name and additional arguments.
    Code snippet :
    Java Class :
    try{
         String fileName ="test.ksh";
         String argValue ="satish"; // value passed to the script
         String exeParam = "/usr/bin/ksh "+fileName+" "+argValue;
         Process proc = Runtime.getRuntime().exec(exeParam);
         int exitValue = proc.waitFor();
         sop("Exit Value  is : "+exitValue);
    catch(Exception e)
    e.printStackTrace();
    }Test.ksh
      export -- application realated paths..
      nohup  abc.exe 1> test.log 2>&1;
      $1
      exit.By running the above java class , i am getting exit Value: 139 and log file test.log of 0 bytes.
    when i am running the same command (/usr/bin/ksh test.ksh satish) manually, it's calling abc.exe file successfully
    and able generate the logs properly.
    Pls let us know where exactly i am stuck..
    Thanks in advance,
    Regards,
    Satish

    Hi Sabre,
    As per the guidelines provided by the article, i had done below changes..
    InputStream is = null;
    InputStreamReader iStreamReader = null;
    BufferedReader bReader = null;
    String line = null;
    try{
    String fileName ="test.ksh";
    String argValue ="satish"; // value passed to the script
    String exeParam = "/usr/bin/ksh "+fileName+" "+argValue;
    Process proc = Runtime.getRuntime().exec(exeParam);
    is = proc.getErrorStream();
    iStreamReader = new InputStreamReader(is);
    bReader = new BufferedReader(iStreamReader);
    System.out.println("<ERROR>");
    while((line = bReader.readLine()) != null)
    System.out.println("Error is : "+line);
    System.out.println("</ERROR>");
    int exitValue = proc.waitFor();
    sop("Exit Value is : "+exitValue);
    catch(Exception e)
    e.printStackTrace();
    Now , it's showing something like..
    <ERROR>
    </ERROR>

  • How to execute unix shell script from Java ...

    Hi,
    Anyone know how to execute unix shell script from Java?
    Suppose I have several shell scripts written in perl or tcl or bash.
    I just want to catch the output of that script.
    Is there any ready to use module/object for this?
    Please let me know, this is quite urgent for my study assigment.
    Thanks in advance,
    Regards,
    me

    Look up Runtime.exec()

  • Calling UNIX shell script from ODI package?

    Hi,
    How Can we call UNIX shell script from ODI package?
    I have a ftp_ss.sh script which which ftps a file from remote server to local server, archives the last file and renames new file to the standard (ie file data store)name.
    I want to run the above script and interfaces from a package.
    Any help is greately appreciated.
    Thanks,
    RD

    In the package window, put "OS Command" from the toolbox.
    Provide the command parameters to this tool in form of "/path/to/script/ftp_ss.sh"

  • Executing java from unix shell script

    Hi, I am trying to execute java program from a unix shell script and the program has a command line parameter. I have tried in ways like
    /opt/java1.4/bin/java CollExtractLoadProcess /home/inbox/archive/file_name
    /opt/java1.4/bin/java CollExtractLoadProcess "/home/inbox/archive/file_name"
    /opt/java1.4/bin/java CollExtractLoadProcess '/home/inbox/archive/file_name'
    /opt/java1.4/bin/java CollExtractLoadProcess file_name
    No matter how I execute it gives me the following error
    Exception in thread "main" java.lang.ClassFormatError: CollExtractLoadProcess (C
    ode segment has wrong length)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
    3)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    Could someone please let me know what is the correct way of doing this?
    Thanks.

    Sounds like you either have a corrupt class file or you're using an older version of the JVM to try to execute classe that were compiled for a newer version.

  • Execute stored procedure from Unix shell script

    My current method of executing stored procedures (wpl_1 and wpl_2) from a unix shell script is as follows:
    <<wpl.sh>>
    sqlplus user/password @/home/oracle/scripts/wpl.sql
    <<wpl.sql>>
    set serveroutput on size 1000000
    set timing on
    execute wpl_1('0000010676','~')
    execute wpl_2('0000010676','~')
    execute wpl_1('0000010236','FIX')
    execute wpl_2('0000010236','FIX')
    exit
    Question: Is it possible to combine the two scripts (unix and oracle) together?

    A little rusty on this, but this may work:
    My current method of executing stored procedures
    (wpl_1 and wpl_2) from a unix shell script is as
    follows:
    <<wpl.sh>>sqlplus user/password @/home/oracle/scripts/wpl.sql << EOF
    set serveroutput on size 1000000
    set timing on
    execute wpl_1('0000010676','~')
    execute wpl_2('0000010676','~')
    execute wpl_1('0000010236','FIX')
    execute wpl_2('0000010236','FIX')
    exit
    EOF
    >
    Question: Is it possible to combine the two scripts
    (unix and oracle) together?

  • Execute a unix shell script from forms9i

    Hi ,
    I would like to execute a unix shell script form a form when they pressed a button. The forms server is on Linux machine. I tried but when I pressed the button nothings happen. Could some one please help me how I could get working.
    Is there is a way I could execute the unix shell script from PL/SQL proceudre or package.
    Please some one help me.
    Bain

    You would not expect to see anything happening because the
    script cannot directly send output to the web form. However, you can get it to write output to a file and use web.show_document in the form after the host command to display the file and see the output.

  • Calling stored procedure from unix shell script

    Hello,
    I am facing a problem while calling a stored procedure from UNIX shell script. I want to return a output variable from the stored procedure to the UNIX environment.
    Here is the code-
    #!/bin/sh
    OUTPUT=`sqlplus cmag/magnum@dw <<ENDOFSQL
    set serveroutput on;
    var prd_out varchar2(100);
    exec create_pm_window(:prd_out);
    exit;
    ENDOFSQL`
    echo " output is - $OUTPUT"
    The problem is :prd_out is not getting copied to shell variable OUTPUT.
    I have a dbms_output.put_line in the stored proc create_pm_window and I can see that prd_out is getting populated.
    Any help is really appreciated.
    Thanks'
    Rakhee

    First step :
    make sure the PL/SQL works as expected.
    Does the following display the expected output executed from SQL*Plus ?
    set serverout on
    declare
    prd_out varchar2(100);
    begin
    create_pm_window(prd_out);
    dbms_output.put_line('output is '||prd_out);
    end;
    I don't have your procedure, but using a dummy procedure like :
    Scott@my10g SQL>create procedure foo(p_out in out varchar2)   
      2  is
      3  begin
      4  select 'Hello '||instance_name into p_out from v$instance;
      5  end;
      6  /
    Procedure created. and a toto.sh script as :OUTPUT=`sqlplus -s scott/tiger <<EOF
    set pages 0 lines 120 trimout on trimspool on tab off echo off verify off feed off serverout on
    var mavar varchar2(100);
    exec foo(:mavar);
    print mavar;
    exit;
    EOF`
    echo "OUT = ${OUTPUT}"
    exitIt works fine :[oracle@Nicosa-oel ~]$ ./toto.sh
    OUT = Hello my10g

  • Call Unix Shell Script From OBIEE

    Hi All,
    Is it possible to do a call to a Unix Shell Script with the Action Framework from OBIEE.
    Thanks in Advance

    I dont think so but we can go for it instead of BI side. Try to port the same functionality on shell script side, so that the script can identify your report using tail of nqquery log and execute the rest of your lines in shell script.
    This can doable and works as expected. If at all you are going with my suggestion you can go for a small key word to identify your report instead of that lengthy logical query.
    Pls mark if helps

  • RFC_REMOTE_PIPE is Returning 1 alwasys and not able to execute Unix shell script

    Hello All,
    I am trying to execute a simple unix shell script from ABAP.
    What I did so far..
    1. created a test.sh file  with single command echo "Hello".
    2.  placed this file on application server /Usr/sap/test.sh
    3. executing ABAP program which as FM RFC_REMOTE_PIPE
    CODE:
    CALL FUNCTION 'RFC_REMOTE_PIPE'
       DESTINATION 'SERVER_EXEC'
    EXPORTING
       command  = lv_command
       read          = 'X'
    TABLES
       pipedate    =  lt_stdout
    EXCEPTIONS
    system_failure  = 1
    communication_failure = 2.
    if i populate lv_command  = echo "hello" it works fine
    if i give .sh file path in lv_command it is not working. it returns 1.
    Please help...
    I was searching SDN i found that rfcexec service should be enabled... how do i check that..
    i checked t code  \SMGW , i don't see any output...
    i checked FM GWY_READ_CONNECTED_SYSTEMS, i don't hsee anyting related to unix...
    Please suggest.

    I resolved the issue.
    It was issue with permission.
    Script file should have full permission ( Mode 777)..
    Thanks everyone.

  • R/3 to other oracle system Unix Shell scripts Execute

    Hi,
    Here SAP 4.7 version, is it any possibility to run/execute other oracle system Unix shell scripts from sap program?
    With Regards,
    Anil

    ...yes,
    1.define own external command (sm69)
    2. run this command from your ABAP code by callig function module SXPG_COMMAND_EXECUTE
    regards,darek

  • Return codes from sqlldr command from unix shell script

    I am trying to capture error code from sql loader from unix shell script and display proper messages.
    sqlldr parfile=sdb.par control=$cntlfile data=$infile bad=$badFile log=$logFile rows=10000
    rows=10000
    retcode=`echo $?`
    case "$retcode" in
    0) echo "SQL*Loader execution successful" ;;
    1) echo "SQL*Loader execution exited with EX_FAIL, see logfile" ;;
    2) echo "SQL*Loader execution exited with EX_WARN, see logfile" ;;
    3) echo "SQL*Loader execution encountered a fatal error" ;;
    *) echo "unknown return code";;
    esac
    Eventhough, there are errors while executing sqlldr, it is always returing recode zero. What could be the possible reason
    Please advice

    Is there a typo in your code ?
    sqlldr parfile=sdb.par control=$cntlfile data=$infile bad=$badFile log=$logFile rows=10000
    rows=10000
    retcode=`echo $?` In this code, you get the return code of the statement in bold which is not the sqlldr statement ...

Maybe you are looking for

  • Driver for USB 2.0 on Master2 FAR7 ?

    I am getting really slow transfers on USB and suspect I am running at USB 1.  Does anyone know where I can find the latest driver ?  I searched the MSI site but could not find it... I seem to have misplaced the CD that came with the board. BTW, my re

  • Can't add video to new itunes

    Hi, hope someone here can help me because im getting kind of fustrating by not been able to add videos on the new itues. I've got the new video i want to add to the library its on "MP4" format, but for some reason when i go to to the "Add File to Lib

  • Difference - PB00 and PBXX

    Hello Can somebody help me to identify the difference between condition type PBXX and PB00. Why is it that, SAP has given two condition types? What is the significance of access sequence for these two condition types? Thanks for all your help. Best R

  • In Aperture, why do my RAW images momentarily preview well, degrade into extreme colour fringing

    EOS 60D, EF 50mm f/1.4 USM. Shot at f/1.4, ISO 3200, Auto white balance I've loaded the images into Aperture 3.0, and they preview well while the images are loading (I'm assuming they're JPEG previews) then heavily degrade in quality after the image

  • Battery Usage Screen won't display any (app) data

    Hi Folks. I was so lucky that I've got a new iPhone 6 just 20 mins after inital sales here in Germany. On my way to the office in the morning I checked the device, and I really liked the Battery Usage feature. Waited so long for that. However, back i