July 12, 2009 at 12:19 pm
i am working on a ssis package where i get data from a mainframe in flat file but certain columns will be compressed
for example one of the field is defined this way
910S9(3) comp-3Company Number
even though it says company number is 9 and 10 in flat file it can more digits becoz of the datatype.
how do i achieve it in SSIS?
Any suggestion
July 12, 2009 at 5:53 pm
By "achieve", do you mean how do you unpack it? Sounds like a derived column to me. What's the unpacking algorithm?
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
July 13, 2009 at 6:13 am
I'm not sure from what sort of database you are getting the data from the mainframe, but I about Adabas, and in Adabas you first have to unpack the type before FTP'ing the data to the server and a flat file. If you are using Adabas, I'll be able to help on that 1
July 13, 2009 at 9:01 am
Unless you are using an custom written application you will need to change (convert) all comp-3 (packed decimal) and comp (binary) data types to 'display' data on the mainframe first. EBCDIC and ASCII native formats are different.
RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."
July 13, 2009 at 10:00 am
I agree with Rudy.
If you want to look at building your own conversion routine then look for 'Packed Decimal' or 'comp-3' in Google.
It will be quicker and easier to do this conversion on the mainframe, using CAST in the command that exports your data.
Original author: https://github.com/SQL-FineBuild/Common/wiki/ 1-click install and best practice configuration of SQL Server 2019, 2017 2016, 2014, 2012, 2008 R2, 2008 and 2005.
When I give food to the poor they call me a saint. When I ask why they are poor they call me a communist - Archbishop Hélder Câmara
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply