Job Fails when setting workflow status from vbscript -
04-28-2005
, 02:12 PM
Hi!,
I've a DTS containing a vbscript that change another step status so as to
skip a datapump task when a source file is empty.
It works fine when executing the DTS manually, but when executing it as a
job step with the cmdexec mode, it allways return exit code= 2.
I executed it outside the job, using xp_cmdshell, and I've found that it's
the DTSRun that returns exit code 2 when in the DTS a task is skipped via
vbscript.
The code that change status is described at follow:
Set oPkg = DTSGlobalVariables("MensajeArchivoFact").Parent.Pa rent
Set oStep = oPkg.Steps("DTSStep_DTSDataPumpTask_8")
oStep.ExecutionStatus = 4 'Completed
Set oStep = oPkg.Steps("DTSStep_DTSExecuteSQLTask_2")
oStep.PrecedenceConstraints("DTSStep_DTSDataPumpTa sk_8").PrecedenceBasis = 0
oStep.PrecedenceConstraints("DTSStep_DTSDataPumpTa sk_8").Value = 4
Any idea about it ?
Thanks in advance
Leandro |