Convert DTS Transformation script into SSIS


I am looking at VB script that looks like the following:

Is there a SSIS task that handles like that?
Dim cr_id, tohr, fromhr, record, WeightCalc
	record = DTSSource("record")
	if rtrim(mid(record, 129,12)) = "" then 
		record = mid(record, 1,128) + "000000000000" + mid(record, 141)
	end if
	if rtrim(mid(record,47,8)) = "" then  
		record = mid(record, 1,46) + "00000000" + mid(record, 55)
	end if
	If rtrim(mid(record,85,8)) = "" then 
		record = mid(record, 1,84) + "00000000" + mid(record, 93)
	end if 
	If rtrim(mid(record,97,8)) = "" then
		record = mid(record, 1,96) + "00000000" + mid(record, 105)
	end if

Open in new window

Who is Participating?
Reza RadConsultant, TrainerCommented:
you can do all of these within Data Flow task with Derived Column Transform or with Script Component,
if you could tell us sample input data rows and sample desired output and we will help you to implement it in SSIS
Try using an ActiveX Script task.


yechanAuthor Commented:
Hi reza_rad,

thanks for your input.  I think I am going to try to implement this with a "Script Component".  The sample code above is a small snapshot of a 15 page script.  Thank you.  HOpe it's ok if I split the points.  I have the feeling I will be quite a bit here for next week or so =)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.