Execute process task is failing

  • Hi Everyone,

    I am trying to execute a dos command using EXECUTE PROCESS TASK and I am getting an error message as below:

    The process exit code was "1" while the expected was "0.

    I have a variable in which the values is like below:

    Variable name : DOSCMD

    Value: dir \\DVSQL10\ETL_SCRIPTS\BATCHPROCESSING\PADB_INT\PROJECTS\TOTAL_COHORT_FTP_TAB\INPUT\totcoh*_*.zip /B /O:N | sort -r > \\DVSQL10\ETL_SCRIPTS\BATCHPROCESSING\PADB_INT\PROJECTS\TOTAL_COHORT_FTP_TAB\INPUT\TOTCOHORT.TXT

    Actually the command is just sorting the files in a folder and outputting the result into TOTCOHORT.TXT. The same command was successfully executed in DOS manually.

    The following are the arguments I am passing in the process task page of EXECUTE PROCESS TASK.

    Executable: C:\WINDOWS\system32\cmd.exe

    Working Directory: C:\WINDOWS\system32

    Standard Input Variable : User::DOSCMD

    Successvalue = 0

    Timeout =0

    Windowstyle = minimized.

    Its very urgent and any help to resolve this issue is much appreciated.

    Thanks in advance.

  • Can anyone helpme urgently.....as my whole process got stuck with this problem.

  • Hello,

    The process that you're executing. Is it a VB or C# program?

    Strick

  • Hi,

    First of all thanks for your reply. The process is not VB or C# program I am trying to execute the dos command inside EXECUTE PROCESS TASK.

    Thanks in advance.

  • Add Expressions->executable property to the variable and try executing it

  • saidwarak01 (5/21/2010)


    Hi,

    First of all thanks for your reply. The process is not VB or C# program I am trying to execute the dos command inside EXECUTE PROCESS TASK.

    Thanks in advance.

    Which DOS command?

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • Reason why I asked my earlier question was because sometimes programmers forget to return the status code of 0 or 1 from their VB or C# programs when they are going to be ran from another process.

    The process that you're executing is returning a exit code of a non zero which means that program is failing. You may have to investigate why that proces is failing. Are you able to run that process manually yourself and have it succeed?

    Strick

  • Hi Phil,

    The dos command is there in my first post inside the variable value DOSCMD.

    please let me know if you need any other info.

    Thanks

  • Hi Strickyn,

    As I mentioned if I am executing the dos command manually I am able to get the result without any error.

    Thanks

  • saidwarak01 (5/21/2010)


    Hi Phil,

    The dos command is there in my first post inside the variable value DOSCMD.

    please let me know if you need any other info.

    Thanks

    Sorry - I did not read the whole thread before replying. Have you tried setting the 'Success Value' property of the Execute Process task to 1?

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • Hello,

    Are you feeding any arguments from your SSIS package Execute Process task? It's also possible that the arguments you're feeding may by incorrect or may not match the arguments of the program you're executing.

    Thanks,

    Strick

  • Hi phil,

    No apologies please. I already tried replacing the success value from 0 to 1. When I change success value to 1 and then execute the task , the task completes successfully but it is not creating the output file.

    Thanks a lot for your replies.

  • I am just using the standard input variable and one more small change what I did just now in compare to changes what I posted in my first post are

    executable value : C:\windows\system32\cmd.exe

    working directoty: c:

    standardinputvariable : User:DOSCMD.

    Thanks

Viewing 13 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic. Login to reply