May 20, 2010 at 9:29 am
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.
May 20, 2010 at 10:40 am
Can anyone helpme urgently.....as my whole process got stuck with this problem.
May 20, 2010 at 1:44 pm
Hello,
The process that you're executing. Is it a VB or C# program?
Strick
May 21, 2010 at 8:42 am
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.
May 21, 2010 at 9:00 am
Add Expressions->executable property to the variable and try executing it
May 21, 2010 at 9:05 am
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?
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
May 21, 2010 at 10:26 am
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
May 21, 2010 at 10:41 am
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
May 21, 2010 at 10:42 am
Hi Strickyn,
As I mentioned if I am executing the dos command manually I am able to get the result without any error.
Thanks
May 21, 2010 at 11:06 am
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?
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
May 21, 2010 at 11:15 am
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
May 21, 2010 at 11:23 am
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.
May 21, 2010 at 11:28 am
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