How do I load comp-3 (packed decimal) data

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
hitmanthesilentassasin
Participant
Posts: 150
Joined: Tue Mar 13, 2007 1:17 am

How do I load comp-3 (packed decimal) data

Post by hitmanthesilentassasin »

Hi - How do we handle the comp-3(packed decimal) with hex data in complex flat file? is there a separate option to handle this ?

[* Note - Title changed to be more descriptive - Andy *]
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

What makes you think you have "hex data" in your COMP-3 field? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
hitmanthesilentassasin
Participant
Posts: 150
Joined: Tue Mar 13, 2007 1:17 am

Post by hitmanthesilentassasin »

because that is how the source team defined it. I dont understand much about it so I might not be wording it properly. However, Please refere to the link Linkhttp://www.simotime.com/datapk01.htm In the second table it has defined the positive and negative Hex data. which I am not able to read using CFF. So, Could you please help me?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

OK, that's what I was afraid of. COMP-3 is packed decimal and packed is packed, not even EBCDIC or ASCII technically, just... packed. It can look like hex data if you look at the raw data, but it isn't.

Why are you "not able to read it" using the CFF? What exactly are you doing and what errors are you seeing? It should handle them just fine unless you are doing something like converting the file from EBCDIC to ASCII during the file transfer, which will destroy the packed data.
-craig

"You can never have too many knives" -- Logan Nine Fingers
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

Additionally, I assume this is coming from a COBOL source? If so, have them send you the COBOL copybook definition for the file being transmitted to you. Then use that copybook to load the metadata for the Complex Flat File Stage. That should help you out a lot...
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
Post Reply