SYSDTSSTEPLOG progresscount -
10-02-2003
, 10:24 AM
I have a DTS package that is running five Data Driven Query tasks.
When I view the progresscount in msdb..sysdtssteplog, I can see the
progresscount for the first four tasks but not the fifth. Each task
does similiar processing. Insert and update queries are defined to
each DDQ task. There are some rows of the input file that are also
bypassed. As far as I can see there is not any difference between the
ActiveX script. Does anyone have any ideas as to why the count for
the fifth task shows up as zero? Below are the scripts for one of the
tasks that has a progresscount and the script for the task that does
not.
Sorry for the long read and thanks in advance for your help!!!
Scott
Here is the script for a task that has the progresscount column
successfully updated (it shows a count of 3):
'************************************************* *********************
' Visual Basic Transformation Script
'************************************************* ***********************
' Copy each source column to the destination column
Function Main()
set cn = CreateObject("ADODB.Connection")
cn.Open = DTSGlobalVariables("WNHS_DatabaseConnectString2"). Value
sql = "SELECT PRDT_GROUP_CDE FROM T5014_PRODUCT_GROUP WHERE
PRDT_GROUP_CDE = '" & DTSSource("Col001") & "'"
set rs = CreateObject("ADODB.Recordset")
rs.Open sql, cn
if rs.EOF and rs.BOF then
DTSGlobalVariables("WNDN_T5014InsertCounter").Valu e =
DTSGlobalVariables("WNDN_T5014InsertCounter").Valu e + 1
DTSDestination("PRDT_GROUP_CDE") = DTSSource("Col001")
DTSDestination("PRDT_GROUP_DESC") = DTSSource("Col002")
Main = DTSTransformstat_InsertQuery
else
DTSDestination("PRDT_GROUP_DESC") =
DTSLookups("lkupDescription").Execute(DTSSource("C ol001"))
if DTSDestination("PRDT_GROUP_DESC") = "" then
DTSDestination("PRDT_GROUP_DESC") = " "
end if
if RTRIM(DTSDestination("PRDT_GROUP_DESC")) = DTSSource("Col002")
then
DTSGlobalVariables("WNDN_T5014BypassCounter").Valu e =
DTSGlobalVariables("WNDN_T5014BypassCounter").Valu e + 1
Main = DTSTransformStat_SkipRow
else
DTSGlobalVariables("WNDN_T5014UpdateCounter").Valu e =
DTSGlobalVariables("WNDN_T5014UpdateCounter").Valu e + 1
DTSDestination("PRDT_GROUP_CDE") = DTSSource("Col001")
DTSDestination("PRDT_GROUP_DESC") = DTSSource("Col002")
Main = DTSTransformstat_UpdateQuery
end if
end if
set rs = nothing
set cn = nothing
End Function
Here is the script for the task that does not have the progresscount
column successfully updated (it shows as 0):
'************************************************* *********************
' Visual Basic Transformation Script
'************************************************* ***********************
' Copy each source column to the destination column
Function Main()
dim arrayProductMaster
set cn = CreateObject("ADODB.Connection")
cn.Open = DTSGlobalVariables("WNHS_DatabaseConnectString2"). Value
sql = "SELECT PRDT_ID FROM T5010_PRODUCT_MASTER WHERE PRDT_ID = '" &
DTSSource("Col001") & "'"
set rs = CreateObject("ADODB.Recordset")
rs.Open sql, cn
if rs.EOF and rs.BOF then
DTSGlobalVariables("WNDN_T5010InsertCounter").Valu e =
DTSGlobalVariables("WNDN_T5010InsertCounter").Valu e + 1
DTSDestination("PRDT_ID") = DTSSource("Col001")
DTSDestination("PRDT_DESC") = DTSSource("Col002")
DTSDestination("PRDT_CLASS_CDE") = DTSSource("Col005")
DTSDestination("PRDT_LINE_CDE") = DTSSource("Col004")
DTSDestination("PRDT_TYP_CDE") = DTSSource("Col003")
DTSDestination("PRDT_GROUP_CDE") = DTSSource("Col012")
DTSDestination("KIT_TYP_CDE") = DTSSource("Col006")
DTSDestination("PUBLICATION_STS_CDE") = DTSSource("Col007")
DTSDestination("ISBN_NBR") = DTSSource("Col008")
DTSDestination("ON_HAND_QTY") = DTSSource("Col009")
DTSDestination("SUBST_PRDT_ID") = DTSSource("Col010")
DTSDestination("INV_CYCLE_CNT_CDE") = DTSSource("Col011")
DTSDestination("ITEMS_PER_CARTON_QTY") = DTSSource("Col013")
Main = DTSTransformstat_InsertQuery
else
arrayProductMaster =
DTSLookups("lkupValues").Execute(DTSSource("Col001 "))
DTSDestination("PRDT_DESC") = arrayProductMaster(0)
DTSDestination("PRDT_CLASS_CDE") = arrayProductMaster(1)
DTSDestination("PRDT_LINE_CDE") = arrayProductMaster(2)
DTSDestination("PRDT_TYP_CDE") = arrayProductMaster(3)
DTSDestination("PRDT_GROUP_CDE") = arrayProductMaster(4)
DTSDestination("KIT_TYP_CDE") = arrayProductMaster(5)
DTSDestination("PUBLICATION_STS_CDE") = arrayProductMaster(6)
DTSDestination("ISBN_NBR") = arrayProductMaster(7)
DTSDestination("ON_HAND_QTY") = arrayProductMaster(8)
DTSDestination("SUBST_PRDT_ID") = arrayProductMaster(9)
DTSDestination("INV_CYCLE_CNT_CDE") = arrayProductMaster(10)
DTSDestination("ITEMS_PER_CARTON_QTY") = arrayProductMaster(11)
' MsgBox ("ITEMS_PER_CARTON_QTY:" &
DTSDestination("ITEMS_PER_CARTON_QTY"))
if RTRIM(DTSDestination("PRDT_DESC")) = DTSSource("Col002") and _
RTRIM(DTSDestination("PRDT_CLASS_CDE")) = DTSSource("Col005") and
_
RTRIM(DTSDestination("PRDT_LINE_CDE")) = DTSSource("Col004") and _
RTRIM(DTSDestination("PRDT_TYP_CDE")) = DTSSource("Col003") and _
RTRIM(DTSDestination("PRDT_GROUP_CDE")) = DTSSource("Col012") and
_
RTRIM(DTSDestination("KIT_TYP_CDE")) = DTSSource("Col006") and _
RTRIM(DTSDestination("PUBLICATION_STS_CDE")) = DTSSource("Col007")
and _
(RTRIM(DTSDestination("ISBN_NBR")) = DTSSource("Col008") or
(IsNull(DTSDestination("ISBN_NBR")) = IsEmpty(DTSSource("Col008"))))
and _
RTRIM(DTSDestination("ON_HAND_QTY")) = DTSSource("Col009") and _
(RTRIM(DTSDestination("SUBST_PRDT_ID")) = DTSSource("Col010") or
(IsNull(DTSDestination("SUBST_PRDT_ID")) =
IsEmpty(DTSSource("Col010")))) and _
RTRIM(DTSDestination("INV_CYCLE_CNT_CDE")) = DTSSource("Col011")
and _
(RTRIM(DTSDestination("ITEMS_PER_CARTON_QTY")) =
DTSSource("Col013") or (IsNull(DTSDestination("ITEMS_PER_CARTON_QTY"))
= IsEmpty(DTSSource("Col013")))) then
DTSGlobalVariables("WNDN_T5010BypassCounter").Valu e =
DTSGlobalVariables("WNDN_T5010BypassCounter").Valu e + 1
Main = DTSTransformStat_SkipRow
else
DTSGlobalVariables("WNDN_T5010UpdateCounter").Valu e =
DTSGlobalVariables("WNDN_T5010UpdateCounter").Valu e + 1
DTSDestination("PRDT_ID") = DTSSource("Col001")
DTSDestination("PRDT_DESC") = DTSSource("Col002")
DTSDestination("PRDT_CLASS_CDE") = DTSSource("Col005")
DTSDestination("PRDT_LINE_CDE") = DTSSource("Col004")
DTSDestination("PRDT_TYP_CDE") = DTSSource("Col003")
DTSDestination("PRDT_GROUP_CDE") = DTSSource("Col012")
DTSDestination("KIT_TYP_CDE") = DTSSource("Col006")
DTSDestination("PUBLICATION_STS_CDE") = DTSSource("Col007")
DTSDestination("ISBN_NBR") = DTSSource("Col008")
DTSDestination("ON_HAND_QTY") = DTSSource("Col009")
DTSDestination("SUBST_PRDT_ID") = DTSSource("Col010")
DTSDestination("INV_CYCLE_CNT_CDE") = DTSSource("Col011")
DTSDestination("ITEMS_PER_CARTON_QTY") = DTSSource("Col013")
' MsgBox ("ITEMS_PER_CARTON_QTY:" &
DTSDestination("ITEMS_PER_CARTON_QTY"))
Main = DTSTransformstat_UpdateQuery
end if
end if
set rs = nothing
set cn = nothing
End Function |