*"Wrong process return code"* Unix Command

Hi,
I have created Package with Procedure having Unix command.Unix command is only to cp data file from one folder to another archive folder.
we are defining variable FilePath and FileName.
cp #FILE_PATH/#FILE_NAME.tag #FILE_PATH/archive/;
But while running this we are getting following erorr.
*"Wrong process return code"*
Plz suggest.
Thanks
Ashwini

Hi Aswini-
You should not use # symbol for your variable pointers, it will take as a comment line. Please use the below syntax:
FILE_PATH=c:\temp
FILE_NAME=test.txt
cp $FILE_PATH/$FILE_NAME.tag $FILE_PATH/archive/
And also you can check the exact error by executing the script file in your unix command prompt like this:
/home/test/test.sh
Hope this will work for you.
Thanks,
Saravanan Rajavel

Similar Messages

  • "Wrong process return code" Error which using OS Command

    Hi,
    I want to execute a shell script in unix which calls a sed script and input to the script is an xml file. I am using OS Command tool to call the script which fails with "Wrong process return code" error. I ran the command directly on UNIX box and works fine but fails when executed through a package in ODI.
    The command I am passing in OS Command window is as follows:
    /test/callSed.sh emp.xml
    I also tried ODIOSCommand but getting the same error. The shell script has execute privileges for all users. Is there any other property to be set up for running shell scipts through ODI?
    Appreciate you response.
    Thanks!

    Hi,
    Thanks for a quick response.
    I tried both the commands you sent. "sh ./test/callSed.sh emp.xml" threw Wrong process return code error and "./test/callSed.sh emp.xml" threw the following error:
    java.io.IOException: Cannot run program "./test/callSed.sh": java.io.IOException: error=2, No such file or directory
         at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
         at java.lang.Runtime.exec(Runtime.java:593)
         at java.lang.Runtime.exec(Runtime.java:431)
         at java.lang.Runtime.exec(Runtime.java:328)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execOsOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execOsOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlS.treatTaskTrt(SnpSessTaskSqlS.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandScenario.treatCommand(DwgCommandScenario.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.k(e.java)
         at com.sunopsis.dwg.cmd.g.G(g.java)
         at com.sunopsis.dwg.dbobj.SnpScen.a(SnpScen.java)
         at com.sunopsis.dwg.dbobj.SnpScen.localExecuteSync(SnpScen.java)
         at com.sunopsis.dwg.tools.StartScen.actionExecute(StartScen.java)
         at com.sunopsis.dwg.function.SnpsFunctionBaseRepositoryConnected.execute(SnpsFunctionBaseRepositoryConnected.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execIntegratedFunction(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execCollOrdersIntegratedFunction(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlS.treatTaskTrt(SnpSessTaskSqlS.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.k(e.java)
         at com.sunopsis.dwg.cmd.g.A(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
         at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
         at java.lang.ProcessImpl.start(ProcessImpl.java:65)
         at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
         ... 31 more
    Regards,
    Aks

  • Wrong process return code: 1

    I thought I can run the OdiReverseResetTable command by choosing "Operating System" as target technology in the Knowledge Module.
    Type this command:
    cmd /c C:\Oracle\ODI11.1.1.6\oracledi\agent\bin\startcmd OdiReverseResetTable -MODEL=1001But it gives another error:
    Wrong process return code: 1When I remove the arguments ( ) it works very well :
    cmd /c C:\Oracle\ODI11.1.1.6\oracledi\agent\bin\startcmdHow can I call startcmd command with arguments? By the way I am using Local Agent and ODI 11.1.1.6.
    Thanks.
    Edited by: XYZ123 on 08.Nis.2013 12:23

    It does not work as well, I tried all but nothing works:
    cmd /c C:\Oracle\ODI11.1.1.6\oracledi\agent\bin\startcmd "OdiReverseResetTable -MODEL=1001"
    cmd /c C:\Oracle\ODI11.1.1.6\oracledi\agent\bin\startcmd OdiReverseResetTable "-MODEL=1001"
    cmd /c C:\Oracle\ODI11.1.1.6\oracledi\agent\bin\startcmd "OdiReverseResetTable" "-MODEL=1001"

  • Wrong process return code in ODI

    Hi,
    I am using store procedure to run batch file on other server.
    I get excuted success fully on that server but ODI procedure showing error
    "Wrong process return code"
    Return code is 1
    Can anybody help to solve this type of error
    Thanks
    Kiran Kokade

    For ODI related question , goto Data Integrator

  • Return Code after Command Line (File Adapter)

    Hello all,
    i execute in the File Receiver Channel a Shell Script.
    Now i need a solution, when an error happens. The script returns an error code and i want that the Adapter Monitor is showing this information/error.
    How can i enable this?
    Or is there an other possibility to monitor this??
    many thanks for your help
    ilka

    Hi IIka,
    I have not tried this but I think
      The return code of the script cannot be shown in monitor, because the call ends (does not expect a response) once the file adapter is called.
    May be you can capture the errors in a seperate file and
    use that as a log.
    I am not sure if there is anyother way
    also check this blog /people/michal.krawczyk2/blog/2005/08/17/xi-operation-system-command--error-catching
    Regards
    Vishnu

  • Get return code in command line

    Hi,
    Is possible modify or get return code diferent 0 or 1 when start scenario using command line?

    i use control+M, and result with erros in E$, send to "hospital" whit this

  • Execute UNIX Command in ODI

    Hi I have the fiollowing command which i am running in a procedure which is a DOS command.
    cmd /c dir c:\XYZ\testfile_ML_fusion_*.txt /b /a:-d > c:\ABC\ML_Files_Names.txt.
    The equivalent command in UNIX is
    ls filetest*.txt > All_File_Names.txt
    Please let me know whether we can use this command in Procedure.. I have used this but it is throwing an error with Wrong Process Return Code.
    Let me know as soon as possible.
    Thanks,
    Mansur

    Use ODI OS command tool in the ODI package.
    create an interface in ODI using LKM File to Sql and the output file generated with the csv file's row count as a source and the db table(where the count needs to be stored) as a target

  • Failed (why else would I post). Error creating an image of Drive D:, rc = 2. Return Code -2147467259 0x80004005. "Not enough storage is available to process this command".

    Seems a common set of Return Codes to post so apologies that's not specific.
    To me appears the issue is related to the "Not enough storage is available to process this command" log entry. Looked into it and some SCCM 2007 issues that were related to too many sessions to the site server, but even after rebooting my MDT server
    I get the same issue.
    The server I am attempting to capture has a 60gb VHD with around 30gb actually used. The MDT Server has over 100GB free space.
    Here is from BDD.log:
      Console > Turning on VERIFY option for network share
    ZTIBackup 10/10/2014 12:56:30 PM
    0 (0x0000)
      Console > Scanning files and directories...
    ZTIBackup 10/10/2014 12:56:30 PM
    0 (0x0000)
      Console > Error imaging drive [D:\]
    ZTIBackup 10/10/2014 12:56:30 PM
    0 (0x0000)
      Console > Not enough storage is available to process this command.
    ZTIBackup 10/10/2014 12:56:31 PM
    0 (0x0000)
    Return code from command = 2 ZTIBackup
    10/10/2014 12:56:31 PM 0 (0x0000)
    Error creating an image of drive D:, rc = 2
    ZTIBackup 10/10/2014 12:56:31 PM
    0 (0x0000)
    Event 41036 sent: Error creating an image of drive D:, rc = 2
    ZTIBackup 10/10/2014 12:56:31 PM
    0 (0x0000)
    ZTIBackup COMPLETED.  Return Value = 2
    ZTIBackup 10/10/2014 12:56:32 PM
    0 (0x0000)
    ZTI ERROR - Non-zero return code by ZTIBackup, rc = 2
    ZTIBackup 10/10/2014 12:56:32 PM
    0 (0x0000)
    Event 41002 sent: ZTI ERROR - Non-zero return code by ZTIBackup, rc = 2
    ZTIBackup 10/10/2014 12:56:32 PM
    0 (0x0000)
    Command completed, return code = -2147467259
    LiteTouch 10/10/2014 12:56:33 PM
    0 (0x0000)
    Litetouch deployment failed, Return Code = -2147467259  0x80004005
    LiteTouch 10/10/2014 12:56:33 PM
    0 (0x0000)
    Event 41014 sent: Litetouch deployment failed, Return Code = -2147467259  0x80004005
    LiteTouch 10/10/2014 12:56:33 PM
    0 (0x0000)
    I'll post below full logs.

    imagex reported:
      Console > Error imaging drive [D:\]
      Console > Not enough storage is available to process this command.
    obvious question is: do you have enough free space on
    "\\arcadmin3\deploymentshare$\Captures\SIMSERVER.wim"
    Keith Garner - Principal Consultant [owner] -
    http://DeploymentLive.com

  • MDT application install returns unexpected return code: 16

    Hi, I'm using MDT 2013 (Version: 6.2.5019.0) and deploying Server 2012 R2 Standard.
    The deployment runs fine, but an application install fails. Here is the relevant content from the BDD.LOG file:
    Run Command: \\MDT\Share$\Tools\X64\bddrun.exe robocopy \\MDT\Share$\BuildFiles "C:" /MIR /W:5 /R:3 /LOG \\MDT\Share$\LOGS
    ZTI installing application
    About to run command: \\MDT\Share$\Tools\X64\bddrun.exe robocopy \\MDT\Share$\BuildFiles "C:" /MIR /W:5 /R:3 /LOG \\MDT\Share$\LOGS
    Command has been started (process ID 2896)
    Return code from command = 16
    Application Copy Files 1.0 returned an unexpected return code: 16
    Property InstalledApplications001 is now = {9d0ba76d-96f9-4f4f-a6b8-4b1d0ffd2007}
    ZTIApplications processing completed successfully.
    I've searched for the error code 16 but can't find any results. What does it mean?
    Cheers.

    I think that I may have found the solution. On different site I've found the robocopy exit codes and 16 is listed there as "Robocopy
    did not copy any files.  Check the command line parameters and verify that Robocopy has enough rights to write to the destination folder."
    I guess that I need to alter the destination folder to something other than the root of C:\
    I'll respond with the result later.
    UPDATE: Yep, that was the problem.

  • Exception Deployer fails with return code 1603 during Acrobat XI installation

    We are deploying Acrobat XI to Windows 7 clients and a percentage of them fail to execute Exception Deployer successfully and are returning the 1603 return code. I have pasted below relevant portions of the ExceptionDeployer.log file from two different computers with the same return code. Sometimes running the installation again works but sometimes it fails again with the same error code. I haven't been able to find exactly what it is that is failing or how to resolve this.
    4/4/2015 00:04:57 [INFO] ExceptionDeployer - ##################################################
    4/4/2015 00:04:57 [INFO] ExceptionDeployer - Launching the ExceptionDeployer...
    4/4/2015 00:04:57 [WARN] ExceptionDeployer - Failed to initialize the TokenResolver properly.
    4/4/2015 00:04:57 [INFO] ExceptionDeployer - **************************************************
    4/4/2015 00:04:57 [INFO] ExceptionDeployer -    AcrobatProfessional11.0-mul
    4/4/2015 00:05:59 [INFO] ExceptionDeployer - The process return code is (1603).
    4/4/2015 00:05:59 [ERROR] ExceptionDeployer - Exception deployment failed for payload (AcrobatProfessional11.0-mul)
    4/4/2015 00:05:59 [INFO] ExceptionDeployer - **************************************************
    4/6/2015 16:05:56 [INFO] ExceptionDeployer - ##################################################
    4/6/2015 16:05:56 [INFO] ExceptionDeployer - Launching the ExceptionDeployer...
    4/6/2015 16:05:56 [INFO] ExceptionDeployer - **************************************************
    4/6/2015 16:05:56 [INFO] ExceptionDeployer -    AcrobatProfessional11.0-mul
    4/6/2015 16:07:14 [INFO] ExceptionDeployer - The process return code is (1603).
    4/6/2015 16:07:14 [ERROR] ExceptionDeployer - Exception deployment failed for payload (AcrobatProfessional11.0-mul)
    4/6/2015 16:07:14 [INFO] ExceptionDeployer - **************************************************

    Hi ohtesw,
    Please check out this document: Error 1603: A fatal error occurred during installation.
    If the solutions in that document don't do the trick, please let us know.
    Best,
    Sara

  • Getting return code from subprocess execution

    Hi,
    I am executing a batch file as a subprocess and need to get the return code from it.
    The batch file executes a java class, which exits (System.exits(rc)) with a return code on error and how this can be captured in the calling program.
    i am calling the batch file as follows: (fragment)
    Runtime r;
    process p = r.exec(execCmd, null, mqsiToolFile);
    istr = p.getInputStream();
    br = new BufferedReader(new InputStreamReader(istr));          
    returnCode = p.waitFor();
    System.out.println("exit value: "+p.exitValue());
    This successfully executes the subprocess and always returns with code '0', even though the sub-process exits with a code >0.
    p.waitFor() or p.exitValue() - doesn't giving the exit value of the subprocess.
    How can i capture the exit value (System.exit(rc)) from the sub-process.
    I am running the app on Windows NT4 sp6
    Any help would be greatful.
    Thanks in Advance.

    Peter,
    can u be more explanative on this, i can see the run time result (0, 1). But couldn't get familiar on the sample you have given.
    My code is as follows:
    Process p = null;
    Runtime r = Runtime.getRuntime();
    for loop {
    execSubProcess(.., .., ..)
    public int execSubProcess(String excmd, String[] env, File fileDir) throws Exception {
    int res = 0;
         try {
              System.out.println(excmd);
              p = r.exec(excmd, null, fileDir);
              istr = p.getInputStream();
              br = new BufferedReader(new InputStreamReader(istr));
              line = null;
              while ((line = br.readLine()) != null) {
                   System.out.println(line);
              res = p.waitFor();
         System.out.println("sub-process return code: "+p.waitFor());
              System.out.println("sub-process exitValue: "+p.exitValue());
         } catch (Exception e) {
         throw e;
         return res;
    Here i get all the time 'res=0' , even though the subprocess execCmd exits with a return code > 0.
    Is tehre any environment setup or ..needed to capture the subprocess exit code val (System.exit(rc)) in the calling program.
    Please provide more details as per ur convinience.
    thanks

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

  • Using Unix command lines in java code

    I was wondering if there was a way to run a unix command in java code. I know in C++ there is popen, but i don't know of a way in java. The command i need to run is the whois "domain name" command. Any help would be great!
    jarad

    try something like this:
      public static String whois(String domain) throws IOException {
        BufferedReader is = null;
        Process p = null;
        String result = "";
        p = Runtime.getRuntime().exec("whois " + domain);
        is = new BufferedReader(new InputStreamReader(p.getInputStream()));
        String line;
        while((line = is.readLine()) != null)
          result += line;
        return result;
      }

  • How to invoke from UNIX script and pass back return code?

    Though I am an experienced developer, I am new to java. I created a class containing a single method. I have performed my testing by running the class class.method from the command line in a UNIX (Solaris) environment. Now, I would like to have the class.method invoked from a UNIX shell script, and to return a success/failure indicator from the method, to the UNIX script. I modified the method to make it return char, rather than being defined as void. Within the class and method, I declared and initialized a char variable. I added a finally clause which contains a single return statement, returning the char return code variable. Within my UNIX script, I invoke the class/method as follows:
    return_code = java myClass
    This does not seem to be invoking the method however. Can someone please tell me what I am doing wrong? Or is more information needed in order for someone to help me out.
    Please let me know.
    Thanks.
    Brad

    stdunbar,
    Using your suggestion of System.exit(retVal); seems to allow the java method to be performed successfully (Thank You). But I am still having a problem with the value being recognized by the shell script.
    In my script, I'm doing the following:
    java MyClass inputparameter > return_code
    export return_code
    echo $return_code
    But return_code does not seem to contain a value. Just before the System.exit(retVal); I added System.out.println("return code = " + retVal ); and I can see that retVal. When I run the java method outside of the UNIX shell script, I can see that retVal does indeed contain a value. So I think my problem might actually be the code in the UNIX script.
    Thanks again.
    Brad

  • Getting return code from remote script after Unix rsh call

    I hope one of you guys can help me with this issue. I think I've gotten the 'rsh' command to work from the CES application so that the sqr report generation can execute on a remote machine (instead of the app server machine). I'm actually doing this by having the app still execute the ces_sqr script, however, now the ces_sqr script will just have an 'rsh' command in it which will cause the actual real sqr processing to occur remotely.
    I am executing a Unix script which does a remote shell call to another script on a remote machine. The remote script sends a return code when run locally, however, how can I get the calling rsh script to get that return code?
    If I do the following in the rsh script:
    rsh -l resdev morph "/dev/bin/remote_script"
    rc=$?
    echo "$rc\n"
    then the return code that I get is not actually the return code from the remote_scrpit, but it is the return code from the rsh command that is 0 (success) because the rsh command actually executed successfully even though the remote_script could've returned something other than success. How can I get the return code from the remote_script passed back to the rsh calling script?
    Jan Miller
    [email protected]
    202-237-9584

    Please ignore the first paragraph of my previous post.

Maybe you are looking for

  • Smart objects not opening in CS4

    Hi, A few months ago I upgraded to the entire CS4 Premium design package and everything was working just fine.  However, recently I've been having some issues with Illustrator's smart objects, .ai, & .eps files.  Every time I choose to edit a smart o

  • BI reports to KM folder in EP

    Hi, We are working on BI 7.0 SP 6 and EP 7.0 SP 15. We want to broadcast BI reports to KM folder in EP. After reading note 969040, we decided to use WebDAV with Storing documents in the consumer portal. I have following quetions: 1. Do we need to upg

  • How do I connect my ipad2 to a linksys router

    Can anyone help with this issue?  My iPad2 "sees" my wireless network, but it won't allow me to join it.  However, when I or other people bring their wireless PCs to my house, they have no problem connecting to my home network.  I am clueless when it

  • Removing Rows in JTable

    I Wrote an application to display the report of sales in JTable format and create a button "cancel" to remove all rows in the JTable. DefaultTableModel dtm=new DefaultTableModel(); JTable t=new JTable(dtm); if(e.getSource()==cancel) int i=0; int rows

  • Premiere pro 2014

    mac OSX ver10.9.4(i mac/メモリ16GB)なのですが.インストールして開こうとすると「使用できるビデオ再生モジュールを見つけられませんでした.ビデオ表示ドライバーを更新して.もう一度実行してくださ い.」という エラーがでます.どうしたらよいでしょうか? よろしくお願いします.