Visual Basic - DTS con problemas
Para los que conocen de Visual Basic, tengo el siguiente problema en el script, no realiza un tipo break o algo que corte la ejecución del programa, se queda pegado y no termina.
Quizás existe una línea con errores o algo mal tiene.
Favor de sus ayudas.
Gracias
Function Main()
Dim oFSO
Dim sSourceFile
Dim Docfile
set FileSys = CreateObject("Scripting.FileSystemObject")
DocFilename = DTSGlobalVariables("RUTA_LOG").Value & "\DWH_GEN_ARCH_OTCAR_" & DTSGlobalVariables("PERIODO").Value &".log"
set Docfile = FileSys.OpenTextFile (DocFileName,8)
DocFile.write (Date & " " & Time & " - Ejecución de envío de archivo por FTP correcta" & vbCrLf & vbCrLf)
DocFile.write (Date & " " & Time & " - Se procede a borrar archivo temporal TXT, para liberar espacio en servidor" & vbCrLf)
Set oFSO = CreateObject("Scripting.FileSystemObject")
sSourceFile = DTSGlobalVariables("RUTA_ARCHIVO").Value
oFSO.DeleteFile sSourceFile
Set oFSO = Nothing
DocFile.write (Date & " " & Time & " - Archivo Temporal TXT borrado con éxito" & vbCrLf & vbCrLf)
DocFile.write (Date & " " & Time & " - FIN PROCESO CORRECTO" & vbCrLf & vbCrLf)
Main = DTSTaskExecResult_Success
DocFile.close
End Function