Packed Field not converted properly with CFF Stage

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
harshkohli
Participant
Posts: 31
Joined: Wed Feb 04, 2004 2:04 pm
Location: Canada

Packed Field not converted properly with CFF Stage

Post 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.
Harsh Kohli
thurmy34
Premium Member
Premium Member
Posts: 198
Joined: Fri Mar 31, 2006 8:27 am
Location: Paris

Post by thurmy34 »

Hi
Do you check your copybook ?
Hope This Helps
Regards
harshkohli
Participant
Posts: 31
Joined: Wed Feb 04, 2004 2:04 pm
Location: Canada

Post 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.
Harsh Kohli
harshkohli
Participant
Posts: 31
Joined: Wed Feb 04, 2004 2:04 pm
Location: Canada

Post 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.
Harsh Kohli
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
harshkohli
Participant
Posts: 31
Joined: Wed Feb 04, 2004 2:04 pm
Location: Canada

Post 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:
Harsh Kohli
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply