Link to home
Start Free TrialLog in
Avatar of kwebster7327
kwebster7327

asked on

Integration Services - How to Read/Convert a S9(7)V99 Field

I'm trying to import a flat file. One of the columns I'm trying to import is in S9(7)V99 format with a trailing sign (typical data looks like 00000851L). Is there a way to make SSIS convert this into something like a double precision float (DT_R8) without having to script up my own conversion? This seems like something it ought to do, since data is often formatted like this in exports.

Thanks...
Avatar of Anthony Perkins
Anthony Perkins
Flag of United States of America image

>>Is there a way to make SSIS convert this into something like a double precision float (DT_R8) without having to script up my own conversion? <<
No.  You will have to create an ActiveX Transformation to convert that.
Oops!  I see that is SSIS, so it should be: "You will have to use some .NET code to convert that."
Avatar of nmcdermaid
nmcdermaid

You might find something helpful here.

http://msdn2.microsoft.com/en-us/sql/aa336314.aspx

The whole idea of SSIS is that it is configurable. Once you have created this transformation once you can reuse it.... if you are on the ball you could create an entire AS400 SSIS integration library and sell it.
Avatar of kwebster7327

ASKER

Writing a conversion transformation, while possible, appears to be more effort than I want to tackle.

The page at http://docs.hp.com/en/32650-90889/ch06s01.html has a table about halfway down which explains how to do the conversion. Using this, I pretty quickly scripted up the conversion. I just run the incoming file through the script before I start importing.

It's not the way the geeks at MS would do it, but I got it working in about 20 minutes.

How do I award points to myself?

...Ken
ASKER CERTIFIED SOLUTION
Avatar of nmcdermaid
nmcdermaid

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial