dbTalk Databases Forums  

DTS getting to next task before finishing the first

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss DTS getting to next task before finishing the first in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #111  
Old   
Nitin
 
Posts: n/a

Default Re: DTS getting to next task before finishing the first - 06-19-2008 , 12:21 PM






THANKS A TON.....its working now.....THANK YOU...

Take care
Nitin

"matteus" wrote:

Quote:
That's what I do.
I create a ftpcommadn through the activex. Make sure sendftp.bat and
the command file are in teh samae directory.
But because you now use the Execute Process Task , you must delete
these lines:

Set objShell = CreateObject( "WScript.Shell" )
objShell.Run ("ftp -s:" & chr(34) & strFTPScriptFileName & chr(34))
Set objShell = Nothing

the ftp -s etc. is now inside the sendftp.bat

the ftpcommandfile i'm referring to is your strFTPScriptFileName

M.


On Jun 19, 5:37 pm, Nitin <Ni... (AT) discussions (DOT) microsoft.com> wrote:
I am writing something like this on my first ActiveX code...

Set objMyFile = objFSO.CreateTextFile(strFTPScriptFileName, True)
objMyFile.WriteLine ("open " & strFTPServerName)
objMyFile.WriteLine (strLoginID)
objMyFile.WriteLine (strPassword)
objMyFile.WriteLine ("cd " & strFTPServerFolder1)
objMyFile.WriteLine ("ascii")
objMyFile.WriteLine ("lcd " & strLocalFolderName1)
objMyFile.WriteLine ("prompt")
objMyFile.WriteLine ("mget *.*" )
'objMyFile.WriteLine ("mdelete *.*" )

objMyFile.WriteLine ("cd /" )
objMyFile.WriteLine ("cd " & strFTPServerFolder2)
objMyFile.WriteLine ("ascii")
objMyFile.WriteLine ("lcd " & strLocalFolderName2)
objMyFile.WriteLine ("mget *.*" )
'objMyFile.WriteLine ("mdelete *.*" )
objMyFile.WriteLine ("bye")
objMyFile.Close
Set objFSO = Nothing
Set objMyFile = Nothing
Set objShell = CreateObject( "WScript.Shell" )
objShell.Run ("ftp -s:" & chr(34) & strFTPScriptFileName & chr(34))
Set objShell = Nothing
Main = DTSTaskExecResult_Success
End Function

"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



Reply With Quote
  #112  
Old   
Nitin
 
Posts: n/a

Default Re: DTS getting to next task before finishing the first - 06-19-2008 , 12:21 PM






THANKS A TON.....its working now.....THANK YOU...

Take care
Nitin

"matteus" wrote:

Quote:
That's what I do.
I create a ftpcommadn through the activex. Make sure sendftp.bat and
the command file are in teh samae directory.
But because you now use the Execute Process Task , you must delete
these lines:

Set objShell = CreateObject( "WScript.Shell" )
objShell.Run ("ftp -s:" & chr(34) & strFTPScriptFileName & chr(34))
Set objShell = Nothing

the ftp -s etc. is now inside the sendftp.bat

the ftpcommandfile i'm referring to is your strFTPScriptFileName

M.


On Jun 19, 5:37 pm, Nitin <Ni... (AT) discussions (DOT) microsoft.com> wrote:
I am writing something like this on my first ActiveX code...

Set objMyFile = objFSO.CreateTextFile(strFTPScriptFileName, True)
objMyFile.WriteLine ("open " & strFTPServerName)
objMyFile.WriteLine (strLoginID)
objMyFile.WriteLine (strPassword)
objMyFile.WriteLine ("cd " & strFTPServerFolder1)
objMyFile.WriteLine ("ascii")
objMyFile.WriteLine ("lcd " & strLocalFolderName1)
objMyFile.WriteLine ("prompt")
objMyFile.WriteLine ("mget *.*" )
'objMyFile.WriteLine ("mdelete *.*" )

objMyFile.WriteLine ("cd /" )
objMyFile.WriteLine ("cd " & strFTPServerFolder2)
objMyFile.WriteLine ("ascii")
objMyFile.WriteLine ("lcd " & strLocalFolderName2)
objMyFile.WriteLine ("mget *.*" )
'objMyFile.WriteLine ("mdelete *.*" )
objMyFile.WriteLine ("bye")
objMyFile.Close
Set objFSO = Nothing
Set objMyFile = Nothing
Set objShell = CreateObject( "WScript.Shell" )
objShell.Run ("ftp -s:" & chr(34) & strFTPScriptFileName & chr(34))
Set objShell = Nothing
Main = DTSTaskExecResult_Success
End Function

"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



Reply With Quote
  #113  
Old   
Nitin
 
Posts: n/a

Default Re: DTS getting to next task before finishing the first - 06-19-2008 , 12:21 PM



THANKS A TON.....its working now.....THANK YOU...

Take care
Nitin

"matteus" wrote:

Quote:
That's what I do.
I create a ftpcommadn through the activex. Make sure sendftp.bat and
the command file are in teh samae directory.
But because you now use the Execute Process Task , you must delete
these lines:

Set objShell = CreateObject( "WScript.Shell" )
objShell.Run ("ftp -s:" & chr(34) & strFTPScriptFileName & chr(34))
Set objShell = Nothing

the ftp -s etc. is now inside the sendftp.bat

the ftpcommandfile i'm referring to is your strFTPScriptFileName

M.


On Jun 19, 5:37 pm, Nitin <Ni... (AT) discussions (DOT) microsoft.com> wrote:
I am writing something like this on my first ActiveX code...

Set objMyFile = objFSO.CreateTextFile(strFTPScriptFileName, True)
objMyFile.WriteLine ("open " & strFTPServerName)
objMyFile.WriteLine (strLoginID)
objMyFile.WriteLine (strPassword)
objMyFile.WriteLine ("cd " & strFTPServerFolder1)
objMyFile.WriteLine ("ascii")
objMyFile.WriteLine ("lcd " & strLocalFolderName1)
objMyFile.WriteLine ("prompt")
objMyFile.WriteLine ("mget *.*" )
'objMyFile.WriteLine ("mdelete *.*" )

objMyFile.WriteLine ("cd /" )
objMyFile.WriteLine ("cd " & strFTPServerFolder2)
objMyFile.WriteLine ("ascii")
objMyFile.WriteLine ("lcd " & strLocalFolderName2)
objMyFile.WriteLine ("mget *.*" )
'objMyFile.WriteLine ("mdelete *.*" )
objMyFile.WriteLine ("bye")
objMyFile.Close
Set objFSO = Nothing
Set objMyFile = Nothing
Set objShell = CreateObject( "WScript.Shell" )
objShell.Run ("ftp -s:" & chr(34) & strFTPScriptFileName & chr(34))
Set objShell = Nothing
Main = DTSTaskExecResult_Success
End Function

"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



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.