January 10, 2008 at 2:05 pm
We have an 3rd party application that has an import routine configured to handle a variation of mainframe "Packed" numbers. For instance, lets say we have the decimal number 965. If you used a hex editor to look at it in the import source file you would see 2 bytes [09,65]. Not true Comp-3 data, but similar.
We have moved off the mainframe system into the SQL world. I have to rewrite a data export and retain the "packed" representation of a particular numeric field so that we do not have to pay the vendor big bucks to modify their import routine. We use SSIS to output the file using an OLE DB SQL query as the source. I have developed a SQL function to return the "packed" representation. It uses the CHAR() function. But I am having trouble with writing the 00 byte to the file.
For instance, if the value in SQL is 0 (smallint), this import app is expecting to see 2 bytes [00,00] in the data. However, something is
taking my CHAR(0) and writing [20,20], ie. spaces instead of [00,00] nulls.
I've tried a few different approaches, but no success thus far. Does anyone have a method for doing this?
Viewing post 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply