Page 1 of 1

Packed Field not converted properly with CFF Stage

Posted: Tue Jul 03, 2007 1:53 pm
by harshkohli
I am using DataStage XE Ver. 7.51 on HP Unix box. One of our mainframe job zips and then FTP's a file from mainframe to Unix using binary mode. This file has one field as Packed PIC S9(7) COMP-3. When I use this file in the CFF Stage (After unzipping on Unix), it does not show the correct value. On the mainframe it has a value of 123199 ('0123199F' with HEX ON) but on the Unix it shows '29038863'. I am using this field as BINARY (7) in the CFF stage. Can someone please let me know why CFF is not converting it properly and how to fix this issue.

Thanks.

Posted: Wed Jul 04, 2007 3:32 am
by thurmy34
Hi
Do you check your copybook ?

Posted: Wed Jul 04, 2007 6:08 am
by harshkohli
I don't have a copy book on the Unix as the file comes from the mainframe from a different group and the layout they gave me has one field as a Packed field which is defined as PIC S9(7) COMP-3.

Posted: Wed Jul 04, 2007 6:09 am
by harshkohli
I don't have a copy book on the Unix as the file comes from the mainframe from a different group and the layout they gave me has one field as a Packed field which is defined as PIC S9(7) COMP-3.

Posted: Wed Jul 04, 2007 7:23 am
by chulett
I'm not all that familiar with the CFF stage, but from what I recall declaring something a BINARY would be equivalent to a COBOL COMP-1 field, not a COMP-3. Seems like there would be a different choice you should make for COMP-3 - something like Packed or Packed Decimal perhaps? :?

Posted: Wed Jul 04, 2007 10:35 am
by harshkohli
There is no Packed or Packed Decimal choice in the field type in CFF stage. I tried other available types as well but still it is NOT showing the correct values. Any other suggestion.... :roll:

Posted: Wed Jul 04, 2007 11:01 am
by chulett
And yet oddly enough you can specify COMP-3. :roll:

As noted in the online help, you can right-click on the Source Column row for that field and select 'Edit Row'. In the COBOL definition in the bottom half you'll find a Usage option, where COMP-3 is one of the valid values.