Page 1 of 1

datatype of compressed data.

Posted: Thu Mar 16, 2006 7:55 am
by kalpna
Hi!
Can anyone tell me what is the sql datatype for compressed data??

Thanks
Kalpna.

Posted: Thu Mar 16, 2006 8:02 am
by chulett
Define what you mean by 'compressed data'.

Posted: Thu Mar 16, 2006 8:12 am
by kumar_s
How about VarBinary or LongVarBinary ?

Posted: Thu Mar 16, 2006 8:25 am
by kalpna
kumar_s wrote:How about VarBinary or LongVarBinary ?
No! tried both!! it doesn't work

Thanks
Kalpna

Posted: Thu Mar 16, 2006 8:50 am
by DSguru2B
Probably there is a seperate utility to Unzip MQ compressed XML files.

Posted: Thu Mar 16, 2006 8:55 am
by kalpna
DSguru2B wrote:Probably there is a seperate utility to Unzip MQ compressed XML files.
No! its not MQ compressed data..its of gzip.

Posted: Thu Mar 16, 2006 9:02 am
by kalpna
adding to that..

when i use bit datatype and try unzipping it..
it says..
unexpected end of file..
does that mean it recognised the format..now.
same with unknown datatype.

Posted: Thu Mar 16, 2006 9:03 am
by kumar_s
Can you uncompress the same file using the mentioned command from command prompt with out any issue?

Posted: Thu Mar 16, 2006 9:12 am
by kalpna
kumar_s wrote:Can you uncompress the same file using the mentioned command from command prompt with out any issue?
i am passing the compressed file(using gzip) to the quque from command line only..(for testing)
MQ does not change the content...
but, when i get the same message from the queue, (there i need to define the datatype)..the output is different from datatype to datatype.

i know! it happens when you try to convert binary to string..etc..

but, what is the data type with which we can handle compressed data?

Posted: Thu Mar 16, 2006 10:43 am
by ArndW
compressed data is binary. The first bytes of the file determine what the type is, so in your case the first packet (and most likely all subsequent ones) are being mangled. Can you output the mqseries compressed data straight to a unix file without using datastage? I am willing to bet that it isn't coming in correctly there, either. Binary datatypes in DS mean that the data is not modified in any way.

Posted: Fri Mar 17, 2006 5:01 am
by kalpna
ArndW wrote:compressed data is binary. The first bytes of the file determine what the type is, so in your case the first packet (and most likely all subsequent ones) are being mangled. Can you output the mqseries compressed data straight to a unix file without using datastage? I am willing to bet that it isn't coming in correctly there, either. Binary datatypes in DS mean that the data is not modified in any way.
Arnd!
I tried retreiving message directly from queue to unix box.
it works fine..and I'm able to unzip it.

Thanks
Kalpana.

Posted: Fri Mar 17, 2006 5:17 am
by ArndW
I'm at loss in that case; I don't know why you are getting mangled data. Can you work around it by copying and gunzipping outside of DataStage?

Posted: Fri Mar 17, 2006 5:23 am
by kalpna
ArndW wrote:I'm at loss in that case; I don't know why you are getting mangled data. Can you work around it by copying and gunzipping outside of DataStage? ...
Tried in Unix, tried in windows (as gzip and win zip are compatible)
works fine..
but, not the output from datastage...?? :(

Kalpna.

Posted: Fri Mar 17, 2006 5:44 am
by kalpna
I tried without MQ..
I mean.., i took a file zipped it(GZip), passed through the transformer with the data type binary and wrote to a file with extension .gz.

it does not recognise it as gzip format..

Any clues!!!! :( :!:

Thanks
Kalpna.

Posted: Fri Mar 17, 2006 6:46 am
by kumar_s
kalpna wrote:I tried without MQ..
I mean.., i took a file zipped it(GZip), passed through the transformer with the data type binary and wrote to a file with extension .gz.

it does not recognise it as gzip format..

Any clues!!!! :( :!:

Thanks
Kalpna.
What is the stage you use to read and write?
You can try using ComplexFlatFile and mark the Record Option - Data Format as Binary.
Same in the target.