![]() | |
#41
| |||
| |||
|
|
On Jun 18, 7:54 pm, Nitin <Ni... (AT) discussions (DOT) microsoft.com> wrote: Hey somebody pls come up with some ideas..... "Nitin" wrote: I have ONSUCCESS precedence on all the tasks...logically the second one shud execute only when the first is success..but bcus the first tsk is having the FTP commands and there are some number of them, so before finishing those FTP commands it declares the ActiveX successful and jumps to the next step..where as on the command prompt it still shows the FTp doing its work. "Chris" wrote: What precedent constraints do you have between the steps. If no contraints exist then there is potential that both steps will run at the same time. -Chris "Nitin" wrote: I have a DTS Package where there are 4 tasks all connected to each other with OnSuccess flow , the first task is collecting all the files from FTP and dumping in a STAGING area and then those files from STAGING area are taken and processed with the next 3 remaining tasks. Individually all the task is working fine, but when I run the entire package the first task where it is taking the files from FTP location is taking time but it is declared success and goes to the next step, although the FTP process is still running and has not finished dumping the files to staging area, so on the next step it is not getting the files from the concerned location as the FTP is not finished. Please let me know how to make sure that once this FTP part is over then only it shuld go to the next step Hi Nitin i had a problem like yours. It seems as the task that runs the ftp.exe ends up with success even if the ftp.exe process has not yet finished. Is this your problem? If yes, this is a correct behaviour because ftp.exe (or whatever prg you use to get files) is external to DTS environment. So you should use a batch file that sends and errorcode to the dts control flow. Try to adapt this one, for me it worls very well. FTP -s:%1 > %2 Type %2 >> yourlogfile.log If Exist %2 Type %2 | Find "221 " > Nul If Exist %2 If not errorlevel 1 If not errorlevel 2 goto 221_ok exit 1 :221_ok Type %2 | Find "226 " > Nul If not errorlevel 1 If not errorlevel 2 goto 226_ok exit 1 :226_ok Type %2 | Find "530 " > Nul If errorlevel 1 If not errorlevel 2 goto 530_ok exit 1 :530_ok Type %2 | Find "550 " > Nul If errorlevel 1 If not errorlevel 2 goto 550_ok exit 1 :550_ok exit 0 it checks for a 226 ftp errorcode that means success %1 is the commandfile, which is built dinamically (server, user, password and the file name) with ActiveX Script task. %2 is the log file that this batch checks for various ftp.exe errorcodes. I have to send a file that changes every time (this process runs every 30 minutes on my server) but i believe you could easily use it also for getting files. Please let us know Bye, Matteo |
#42
| |||
| |||
|
|
Hi Matteus.. Thanks a lot..this is exactly what my requirement is..but the solution you gave me,I am not able to understand should i write the entire thing in a activeX task in dts or create a Batch file and execute from Active X or should i write these lines in the same activeX where I am using FTP commands..I just want to go to the next step after finishing this FTP process the next step is also an ActiveX task... Thanks Nitin "matteus" wrote: On Jun 18, 7:54 pm, Nitin <Ni... (AT) discussions (DOT) microsoft.com> wrote: Hey somebody pls come up with some ideas..... "Nitin" wrote: I have ONSUCCESS precedence on all the tasks...logically the second one shud execute only when the first is success..but bcus the first tsk is having the FTP commands and there are some number of them, so before finishing those FTP commands it declares the ActiveX successful and jumps to the next step..where as on the command prompt it still shows the FTp doing its work. "Chris" wrote: What precedent constraints do you have between the steps. If no contraints exist then there is potential that both steps will run at the same time. -Chris "Nitin" wrote: I have a DTS Package where there are 4 tasks all connected to each other with OnSuccess flow , the first task is collecting all the files from FTP and dumping in a STAGING area and then those files from STAGING area are taken and processed with the next 3 remaining tasks. Individually all the task is working fine, but when I run the entire package the first task where it is taking the files from FTP location is taking time but it is declared success and goes to the next step, although the FTP process is still running and has not finished dumping the files to staging area, so on the next step it is not getting the files from the concerned location as the FTP is not finished. Please let me know how to make sure that once this FTP part is over then only it shuld go to the next step Hi Nitin i had a problem like yours. It seems as the task that runs the ftp.exe ends up with success even if the ftp.exe process has not yet finished. Is this your problem? If yes, this is a correct behaviour because ftp.exe (or whatever prg you use to get files) is external to DTS environment. So you should use a batch file that sends and errorcode to the dts control flow. Try to adapt this one, for me it worls very well. FTP -s:%1 > %2 Type %2 >> yourlogfile.log If Exist %2 Type %2 | Find "221 " > Nul If Exist %2 If not errorlevel 1 If not errorlevel 2 goto 221_ok exit 1 :221_ok Type %2 | Find "226 " > Nul If not errorlevel 1 If not errorlevel 2 goto 226_ok exit 1 :226_ok Type %2 | Find "530 " > Nul If errorlevel 1 If not errorlevel 2 goto 530_ok exit 1 :530_ok Type %2 | Find "550 " > Nul If errorlevel 1 If not errorlevel 2 goto 550_ok exit 1 :550_ok exit 0 it checks for a 226 ftp errorcode that means success %1 is the commandfile, which is built dinamically (server, user, password and the file name) with ActiveX Script task. %2 is the log file that this batch checks for various ftp.exe errorcodes. I have to send a file that changes every time (this process runs every 30 minutes on my server) but i believe you could easily use it also for getting files. Please let us know Bye, Matteo |

#43
| |||
| |||
|
|
Hi Matteus.. Thanks a lot..this is exactly what my requirement is..but the solution you gave me,I am not able to understand should i write the entire thing in a activeX task in dts or create a Batch file and execute from Active X or should i write these lines in the same activeX where I am using FTP commands..I just want to go to the next step after finishing this FTP process the next step is also an ActiveX task... Thanks Nitin "matteus" wrote: On Jun 18, 7:54 pm, Nitin <Ni... (AT) discussions (DOT) microsoft.com> wrote: Hey somebody pls come up with some ideas..... "Nitin" wrote: I have ONSUCCESS precedence on all the tasks...logically the second one shud execute only when the first is success..but bcus the first tsk is having the FTP commands and there are some number of them, so before finishing those FTP commands it declares the ActiveX successful and jumps to the next step..where as on the command prompt it still shows the FTp doing its work. "Chris" wrote: What precedent constraints do you have between the steps. If no contraints exist then there is potential that both steps will run at the same time. -Chris "Nitin" wrote: I have a DTS Package where there are 4 tasks all connected to each other with OnSuccess flow , the first task is collecting all the files from FTP and dumping in a STAGING area and then those files from STAGING area are taken and processed with the next 3 remaining tasks. Individually all the task is working fine, but when I run the entire package the first task where it is taking the files from FTP location is taking time but it is declared success and goes to the next step, although the FTP process is still running and has not finished dumping the files to staging area, so on the next step it is not getting the files from the concerned location as the FTP is not finished. Please let me know how to make sure that once this FTP part is over then only it shuld go to the next step Hi Nitin i had a problem like yours. It seems as the task that runs the ftp.exe ends up with success even if the ftp.exe process has not yet finished. Is this your problem? If yes, this is a correct behaviour because ftp.exe (or whatever prg you use to get files) is external to DTS environment. So you should use a batch file that sends and errorcode to the dts control flow. Try to adapt this one, for me it worls very well. FTP -s:%1 > %2 Type %2 >> yourlogfile.log If Exist %2 Type %2 | Find "221 " > Nul If Exist %2 If not errorlevel 1 If not errorlevel 2 goto 221_ok exit 1 :221_ok Type %2 | Find "226 " > Nul If not errorlevel 1 If not errorlevel 2 goto 226_ok exit 1 :226_ok Type %2 | Find "530 " > Nul If errorlevel 1 If not errorlevel 2 goto 530_ok exit 1 :530_ok Type %2 | Find "550 " > Nul If errorlevel 1 If not errorlevel 2 goto 550_ok exit 1 :550_ok exit 0 it checks for a 226 ftp errorcode that means success %1 is the commandfile, which is built dinamically (server, user, password and the file name) with ActiveX Script task. %2 is the log file that this batch checks for various ftp.exe errorcodes. I have to send a file that changes every time (this process runs every 30 minutes on my server) but i believe you could easily use it also for getting files. Please let us know Bye, Matteo |

#44
| |||
| |||
|
|
Hi Matteus.. Thanks a lot..this is exactly what my requirement is..but the solution you gave me,I am not able to understand should i write the entire thing in a activeX task in dts or create a Batch file and execute from Active X or should i write these lines in the same activeX where I am using FTP commands..I just want to go to the next step after finishing this FTP process the next step is also an ActiveX task... Thanks Nitin "matteus" wrote: On Jun 18, 7:54 pm, Nitin <Ni... (AT) discussions (DOT) microsoft.com> wrote: Hey somebody pls come up with some ideas..... "Nitin" wrote: I have ONSUCCESS precedence on all the tasks...logically the second one shud execute only when the first is success..but bcus the first tsk is having the FTP commands and there are some number of them, so before finishing those FTP commands it declares the ActiveX successful and jumps to the next step..where as on the command prompt it still shows the FTp doing its work. "Chris" wrote: What precedent constraints do you have between the steps. If no contraints exist then there is potential that both steps will run at the same time. -Chris "Nitin" wrote: I have a DTS Package where there are 4 tasks all connected to each other with OnSuccess flow , the first task is collecting all the files from FTP and dumping in a STAGING area and then those files from STAGING area are taken and processed with the next 3 remaining tasks. Individually all the task is working fine, but when I run the entire package the first task where it is taking the files from FTP location is taking time but it is declared success and goes to the next step, although the FTP process is still running and has not finished dumping the files to staging area, so on the next step it is not getting the files from the concerned location as the FTP is not finished. Please let me know how to make sure that once this FTP part is over then only it shuld go to the next step Hi Nitin i had a problem like yours. It seems as the task that runs the ftp.exe ends up with success even if the ftp.exe process has not yet finished. Is this your problem? If yes, this is a correct behaviour because ftp.exe (or whatever prg you use to get files) is external to DTS environment. So you should use a batch file that sends and errorcode to the dts control flow. Try to adapt this one, for me it worls very well. FTP -s:%1 > %2 Type %2 >> yourlogfile.log If Exist %2 Type %2 | Find "221 " > Nul If Exist %2 If not errorlevel 1 If not errorlevel 2 goto 221_ok exit 1 :221_ok Type %2 | Find "226 " > Nul If not errorlevel 1 If not errorlevel 2 goto 226_ok exit 1 :226_ok Type %2 | Find "530 " > Nul If errorlevel 1 If not errorlevel 2 goto 530_ok exit 1 :530_ok Type %2 | Find "550 " > Nul If errorlevel 1 If not errorlevel 2 goto 550_ok exit 1 :550_ok exit 0 it checks for a 226 ftp errorcode that means success %1 is the commandfile, which is built dinamically (server, user, password and the file name) with ActiveX Script task. %2 is the log file that this batch checks for various ftp.exe errorcodes. I have to send a file that changes every time (this process runs every 30 minutes on my server) but i believe you could easily use it also for getting files. Please let us know Bye, Matteo |

#45
| |||
| |||
|
|
Hi Matteus.. Thanks a lot..this is exactly what my requirement is..but the solution you gave me,I am not able to understand should i write the entire thing in a activeX task in dts or create a Batch file and execute from Active X or should i write these lines in the same activeX where I am using FTP commands..I just want to go to the next step after finishing this FTP process the next step is also an ActiveX task... Thanks Nitin "matteus" wrote: On Jun 18, 7:54 pm, Nitin <Ni... (AT) discussions (DOT) microsoft.com> wrote: Hey somebody pls come up with some ideas..... "Nitin" wrote: I have ONSUCCESS precedence on all the tasks...logically the second one shud execute only when the first is success..but bcus the first tsk is having the FTP commands and there are some number of them, so before finishing those FTP commands it declares the ActiveX successful and jumps to the next step..where as on the command prompt it still shows the FTp doing its work. "Chris" wrote: What precedent constraints do you have between the steps. If no contraints exist then there is potential that both steps will run at the same time. -Chris "Nitin" wrote: I have a DTS Package where there are 4 tasks all connected to each other with OnSuccess flow , the first task is collecting all the files from FTP and dumping in a STAGING area and then those files from STAGING area are taken and processed with the next 3 remaining tasks. Individually all the task is working fine, but when I run the entire package the first task where it is taking the files from FTP location is taking time but it is declared success and goes to the next step, although the FTP process is still running and has not finished dumping the files to staging area, so on the next step it is not getting the files from the concerned location as the FTP is not finished. Please let me know how to make sure that once this FTP part is over then only it shuld go to the next step Hi Nitin i had a problem like yours. It seems as the task that runs the ftp.exe ends up with success even if the ftp.exe process has not yet finished. Is this your problem? If yes, this is a correct behaviour because ftp.exe (or whatever prg you use to get files) is external to DTS environment. So you should use a batch file that sends and errorcode to the dts control flow. Try to adapt this one, for me it worls very well. FTP -s:%1 > %2 Type %2 >> yourlogfile.log If Exist %2 Type %2 | Find "221 " > Nul If Exist %2 If not errorlevel 1 If not errorlevel 2 goto 221_ok exit 1 :221_ok Type %2 | Find "226 " > Nul If not errorlevel 1 If not errorlevel 2 goto 226_ok exit 1 :226_ok Type %2 | Find "530 " > Nul If errorlevel 1 If not errorlevel 2 goto 530_ok exit 1 :530_ok Type %2 | Find "550 " > Nul If errorlevel 1 If not errorlevel 2 goto 550_ok exit 1 :550_ok exit 0 it checks for a 226 ftp errorcode that means success %1 is the commandfile, which is built dinamically (server, user, password and the file name) with ActiveX Script task. %2 is the log file that this batch checks for various ftp.exe errorcodes. I have to send a file that changes every time (this process runs every 30 minutes on my server) but i believe you could easily use it also for getting files. Please let us know Bye, Matteo |

#46
| |||
| |||
|
|
Hi Matteus.. Thanks a lot..this is exactly what my requirement is..but the solution you gave me,I am not able to understand should i write the entire thing in a activeX task in dts or create a Batch file and execute from Active X or should i write these lines in the same activeX where I am using FTP commands..I just want to go to the next step after finishing this FTP process the next step is also an ActiveX task... Thanks Nitin "matteus" wrote: On Jun 18, 7:54 pm, Nitin <Ni... (AT) discussions (DOT) microsoft.com> wrote: Hey somebody pls come up with some ideas..... "Nitin" wrote: I have ONSUCCESS precedence on all the tasks...logically the second one shud execute only when the first is success..but bcus the first tsk is having the FTP commands and there are some number of them, so before finishing those FTP commands it declares the ActiveX successful and jumps to the next step..where as on the command prompt it still shows the FTp doing its work. "Chris" wrote: What precedent constraints do you have between the steps. If no contraints exist then there is potential that both steps will run at the same time. -Chris "Nitin" wrote: I have a DTS Package where there are 4 tasks all connected to each other with OnSuccess flow , the first task is collecting all the files from FTP and dumping in a STAGING area and then those files from STAGING area are taken and processed with the next 3 remaining tasks. Individually all the task is working fine, but when I run the entire package the first task where it is taking the files from FTP location is taking time but it is declared success and goes to the next step, although the FTP process is still running and has not finished dumping the files to staging area, so on the next step it is not getting the files from the concerned location as the FTP is not finished. Please let me know how to make sure that once this FTP part is over then only it shuld go to the next step Hi Nitin i had a problem like yours. It seems as the task that runs the ftp.exe ends up with success even if the ftp.exe process has not yet finished. Is this your problem? If yes, this is a correct behaviour because ftp.exe (or whatever prg you use to get files) is external to DTS environment. So you should use a batch file that sends and errorcode to the dts control flow. Try to adapt this one, for me it worls very well. FTP -s:%1 > %2 Type %2 >> yourlogfile.log If Exist %2 Type %2 | Find "221 " > Nul If Exist %2 If not errorlevel 1 If not errorlevel 2 goto 221_ok exit 1 :221_ok Type %2 | Find "226 " > Nul If not errorlevel 1 If not errorlevel 2 goto 226_ok exit 1 :226_ok Type %2 | Find "530 " > Nul If errorlevel 1 If not errorlevel 2 goto 530_ok exit 1 :530_ok Type %2 | Find "550 " > Nul If errorlevel 1 If not errorlevel 2 goto 550_ok exit 1 :550_ok exit 0 it checks for a 226 ftp errorcode that means success %1 is the commandfile, which is built dinamically (server, user, password and the file name) with ActiveX Script task. %2 is the log file that this batch checks for various ftp.exe errorcodes. I have to send a file that changes every time (this process runs every 30 minutes on my server) but i believe you could easily use it also for getting files. Please let us know Bye, Matteo |

#47
| |||
| |||
|
|
Hi Matteus.. Thanks a lot..this is exactly what my requirement is..but the solution you gave me,I am not able to understand should i write the entire thing in a activeX task in dts or create a Batch file and execute from Active X or should i write these lines in the same activeX where I am using FTP commands..I just want to go to the next step after finishing this FTP process the next step is also an ActiveX task... Thanks Nitin "matteus" wrote: On Jun 18, 7:54 pm, Nitin <Ni... (AT) discussions (DOT) microsoft.com> wrote: Hey somebody pls come up with some ideas..... "Nitin" wrote: I have ONSUCCESS precedence on all the tasks...logically the second one shud execute only when the first is success..but bcus the first tsk is having the FTP commands and there are some number of them, so before finishing those FTP commands it declares the ActiveX successful and jumps to the next step..where as on the command prompt it still shows the FTp doing its work. "Chris" wrote: What precedent constraints do you have between the steps. If no contraints exist then there is potential that both steps will run at the same time. -Chris "Nitin" wrote: I have a DTS Package where there are 4 tasks all connected to each other with OnSuccess flow , the first task is collecting all the files from FTP and dumping in a STAGING area and then those files from STAGING area are taken and processed with the next 3 remaining tasks. Individually all the task is working fine, but when I run the entire package the first task where it is taking the files from FTP location is taking time but it is declared success and goes to the next step, although the FTP process is still running and has not finished dumping the files to staging area, so on the next step it is not getting the files from the concerned location as the FTP is not finished. Please let me know how to make sure that once this FTP part is over then only it shuld go to the next step Hi Nitin i had a problem like yours. It seems as the task that runs the ftp.exe ends up with success even if the ftp.exe process has not yet finished. Is this your problem? If yes, this is a correct behaviour because ftp.exe (or whatever prg you use to get files) is external to DTS environment. So you should use a batch file that sends and errorcode to the dts control flow. Try to adapt this one, for me it worls very well. FTP -s:%1 > %2 Type %2 >> yourlogfile.log If Exist %2 Type %2 | Find "221 " > Nul If Exist %2 If not errorlevel 1 If not errorlevel 2 goto 221_ok exit 1 :221_ok Type %2 | Find "226 " > Nul If not errorlevel 1 If not errorlevel 2 goto 226_ok exit 1 :226_ok Type %2 | Find "530 " > Nul If errorlevel 1 If not errorlevel 2 goto 530_ok exit 1 :530_ok Type %2 | Find "550 " > Nul If errorlevel 1 If not errorlevel 2 goto 550_ok exit 1 :550_ok exit 0 it checks for a 226 ftp errorcode that means success %1 is the commandfile, which is built dinamically (server, user, password and the file name) with ActiveX Script task. %2 is the log file that this batch checks for various ftp.exe errorcodes. I have to send a file that changes every time (this process runs every 30 minutes on my server) but i believe you could easily use it also for getting files. Please let us know Bye, Matteo |

#48
| |||
| |||
|
|
Hi Matteus.. Thanks a lot..this is exactly what my requirement is..but the solution you gave me,I am not able to understand should i write the entire thing in a activeX task in dts or create a Batch file and execute from Active X or should i write these lines in the same activeX where I am using FTP commands..I just want to go to the next step after finishing this FTP process the next step is also an ActiveX task... Thanks Nitin "matteus" wrote: On Jun 18, 7:54 pm, Nitin <Ni... (AT) discussions (DOT) microsoft.com> wrote: Hey somebody pls come up with some ideas..... "Nitin" wrote: I have ONSUCCESS precedence on all the tasks...logically the second one shud execute only when the first is success..but bcus the first tsk is having the FTP commands and there are some number of them, so before finishing those FTP commands it declares the ActiveX successful and jumps to the next step..where as on the command prompt it still shows the FTp doing its work. "Chris" wrote: What precedent constraints do you have between the steps. If no contraints exist then there is potential that both steps will run at the same time. -Chris "Nitin" wrote: I have a DTS Package where there are 4 tasks all connected to each other with OnSuccess flow , the first task is collecting all the files from FTP and dumping in a STAGING area and then those files from STAGING area are taken and processed with the next 3 remaining tasks. Individually all the task is working fine, but when I run the entire package the first task where it is taking the files from FTP location is taking time but it is declared success and goes to the next step, although the FTP process is still running and has not finished dumping the files to staging area, so on the next step it is not getting the files from the concerned location as the FTP is not finished. Please let me know how to make sure that once this FTP part is over then only it shuld go to the next step Hi Nitin i had a problem like yours. It seems as the task that runs the ftp.exe ends up with success even if the ftp.exe process has not yet finished. Is this your problem? If yes, this is a correct behaviour because ftp.exe (or whatever prg you use to get files) is external to DTS environment. So you should use a batch file that sends and errorcode to the dts control flow. Try to adapt this one, for me it worls very well. FTP -s:%1 > %2 Type %2 >> yourlogfile.log If Exist %2 Type %2 | Find "221 " > Nul If Exist %2 If not errorlevel 1 If not errorlevel 2 goto 221_ok exit 1 :221_ok Type %2 | Find "226 " > Nul If not errorlevel 1 If not errorlevel 2 goto 226_ok exit 1 :226_ok Type %2 | Find "530 " > Nul If errorlevel 1 If not errorlevel 2 goto 530_ok exit 1 :530_ok Type %2 | Find "550 " > Nul If errorlevel 1 If not errorlevel 2 goto 550_ok exit 1 :550_ok exit 0 it checks for a 226 ftp errorcode that means success %1 is the commandfile, which is built dinamically (server, user, password and the file name) with ActiveX Script task. %2 is the log file that this batch checks for various ftp.exe errorcodes. I have to send a file that changes every time (this process runs every 30 minutes on my server) but i believe you could easily use it also for getting files. Please let us know Bye, Matteo |

#49
| |||
| |||
|
|
Hi Matteus.. Thanks a lot..this is exactly what my requirement is..but the solution you gave me,I am not able to understand should i write the entire thing in a activeX task in dts or create a Batch file and execute from Active X or should i write these lines in the same activeX where I am using FTP commands..I just want to go to the next step after finishing this FTP process the next step is also an ActiveX task... Thanks Nitin "matteus" wrote: On Jun 18, 7:54 pm, Nitin <Ni... (AT) discussions (DOT) microsoft.com> wrote: Hey somebody pls come up with some ideas..... "Nitin" wrote: I have ONSUCCESS precedence on all the tasks...logically the second one shud execute only when the first is success..but bcus the first tsk is having the FTP commands and there are some number of them, so before finishing those FTP commands it declares the ActiveX successful and jumps to the next step..where as on the command prompt it still shows the FTp doing its work. "Chris" wrote: What precedent constraints do you have between the steps. If no contraints exist then there is potential that both steps will run at the same time. -Chris "Nitin" wrote: I have a DTS Package where there are 4 tasks all connected to each other with OnSuccess flow , the first task is collecting all the files from FTP and dumping in a STAGING area and then those files from STAGING area are taken and processed with the next 3 remaining tasks. Individually all the task is working fine, but when I run the entire package the first task where it is taking the files from FTP location is taking time but it is declared success and goes to the next step, although the FTP process is still running and has not finished dumping the files to staging area, so on the next step it is not getting the files from the concerned location as the FTP is not finished. Please let me know how to make sure that once this FTP part is over then only it shuld go to the next step Hi Nitin i had a problem like yours. It seems as the task that runs the ftp.exe ends up with success even if the ftp.exe process has not yet finished. Is this your problem? If yes, this is a correct behaviour because ftp.exe (or whatever prg you use to get files) is external to DTS environment. So you should use a batch file that sends and errorcode to the dts control flow. Try to adapt this one, for me it worls very well. FTP -s:%1 > %2 Type %2 >> yourlogfile.log If Exist %2 Type %2 | Find "221 " > Nul If Exist %2 If not errorlevel 1 If not errorlevel 2 goto 221_ok exit 1 :221_ok Type %2 | Find "226 " > Nul If not errorlevel 1 If not errorlevel 2 goto 226_ok exit 1 :226_ok Type %2 | Find "530 " > Nul If errorlevel 1 If not errorlevel 2 goto 530_ok exit 1 :530_ok Type %2 | Find "550 " > Nul If errorlevel 1 If not errorlevel 2 goto 550_ok exit 1 :550_ok exit 0 it checks for a 226 ftp errorcode that means success %1 is the commandfile, which is built dinamically (server, user, password and the file name) with ActiveX Script task. %2 is the log file that this batch checks for various ftp.exe errorcodes. I have to send a file that changes every time (this process runs every 30 minutes on my server) but i believe you could easily use it also for getting files. Please let us know Bye, Matteo |

#50
| |||
| |||
|
|
On 19 Giu, 15:35, Nitin <Ni... (AT) discussions (DOT) microsoft.com> wrote: Hi Matteus.. Thanks a lot..this is exactly what my requirement is..but the solution you gave me,I am not able to understand should i write the entire thing in a activeX task in dts or create a Batch file and execute from Active X or should i write these lines in the same activeX where I am using FTP commands..I just want to go to the next step after finishing this FTP process the next step is also an ActiveX task... Thanks Nitin "matteus" wrote: On Jun 18, 7:54 pm, Nitin <Ni... (AT) discussions (DOT) microsoft.com> wrote: Hey somebody pls come up with some ideas..... "Nitin" wrote: I have ONSUCCESS precedence on all the tasks...logically the second one shud execute only when the first is success..but bcus the first tsk is having the FTP commands and there are some number of them, so before finishing those FTP commands it declares the ActiveX successful and jumps to the next step..where as on the command prompt it still shows the FTp doing its work. "Chris" wrote: What precedent constraints do you have between the steps. If no contraints exist then there is potential that both steps will run at the same time. -Chris "Nitin" wrote: I have a DTS Package where there are 4 tasks all connected to each other with OnSuccess flow , the first task is collecting all the files from FTP and dumping in a STAGING area and then those files from STAGING area are taken and processed with the next 3 remaining tasks. Individually all the task is working fine, but when I run the entire package the first task where it is taking the files from FTP location is taking time but it is declared success and goes to the next step, although the FTP process is still running and has not finished dumping the files to staging area, so on the next step it is not getting the files from the concerned location as the FTP is not finished. Please let me know how to make sure that once this FTP part is over then only it shuld go to the next step Hi Nitin i had a problem like yours. It seems as the task that runs the ftp.exe ends up with success even if the ftp.exe process has not yet finished. Is this your problem? If yes, this is a correct behaviour because ftp.exe (or whatever prg you use to get files) is external to DTS environment. So you should use a batch file that sends and errorcode to the dts control flow. Try to adapt this one, for me it worls very well. FTP -s:%1 > %2 Type %2 >> yourlogfile.log If Exist %2 Type %2 | Find "221 " > Nul If Exist %2 If not errorlevel 1 If not errorlevel 2 goto 221_ok exit 1 :221_ok Type %2 | Find "226 " > Nul If not errorlevel 1 If not errorlevel 2 goto 226_ok exit 1 :226_ok Type %2 | Find "530 " > Nul If errorlevel 1 If not errorlevel 2 goto 530_ok exit 1 :530_ok Type %2 | Find "550 " > Nul If errorlevel 1 If not errorlevel 2 goto 550_ok exit 1 :550_ok exit 0 it checks for a 226 ftp errorcode that means success %1 is the commandfile, which is built dinamically (server, user, password and the file name) with ActiveX Script task. %2 is the log file that this batch checks for various ftp.exe errorcodes. I have to send a file that changes every time (this process runs every 30 minutes on my server) but i believe you could easily use it also for getting files. Please let us know Bye, Matteo OK the code i've posted should be put in a batch file, let's say SendFTP.BAT. The content is static, that remains always the same. What you should do in your package is launch it through a new Execute Process task, and link the rest of your package with a OnSuccess constraint from this EPtask to your next ActiveX Task. And again you could also add a OnFailure constraint to... whatever you want to happen if the send ftp task fails. The EP task should contain these parameters: win32 Prrocess: \\yourserver\yourpath\SendFTP.bat Parameters: \\yourserver\yourpath\yourFTPcommandfile \\\\yourserver \yourpath\yourFTPlogfile Return Code: 0 I know you must get a file but try a send if you can before and let us know ![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |