Issues with Complex Flat File stage, reading Binary 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
parag.s.27
Participant
Posts: 221
Joined: Fri Feb 17, 2006 3:38 am
Location: India
Contact:

Issues with Complex Flat File stage, reading Binary data

Post by parag.s.27 »

Hi All,

I am having a weird problem here: -

I am getting a file ftp'ed to the DataStage 8.1 server in binary format.

using the cobol copybook I imported the layout. Now when I am trying to view the data, the binary field is coming with "-ve" sign and also the length of the value is more than what has been defined in the copybook.

For e.g.,

The copy book has field definition as CLIENT_NUMBER PIC S9(9) BINARY.. Now when I am reading the data it is coming as
"-3214325678". So you can see that the length is not 9 and the -ve sign is coming. Where as the expected value is "323457897". So you see even the digits are replaced.

Where as when I am reading the same file in DS7.5 it is read fine with same layout. Can anyone suggest the solution for it?
Thanks & Regards
Parag Saundattikar
Certified for Infosphere DataStage v8.0
parag.s.27
Participant
Posts: 221
Joined: Fri Feb 17, 2006 3:38 am
Location: India
Contact:

Re: Issues with Complex Flat File stage, reading Binary data

Post by parag.s.27 »

parag.s.27 wrote:Hi All,

I am having a weird problem here: -

I am getting a file ftp'ed to the DataStage 8.1 server in binary format.

using the cobol copybook I imported the layout. Now when I am trying to view the data, the binary field is coming with "-ve" sign and also the length of the value is more than what has been defined in the copybook.

For e.g.,

The copy book has field definition as CLIENT_NUMBER PIC S9(9) BINARY.. Now when I am reading the data it is coming as
"-3214325678". So you can see that the length is not 9 and the -ve sign is coming. Where as the expected value is "323457897". So you see even the digits are replaced.

Where as when I am reading the same file in DS7.5 it is read fine with same layout. Can anyone suggest the solution for it?


Found the solution to this problem, use Big-Endian encoding in the record options of CFF stage.
Thanks & Regards
Parag Saundattikar
Certified for Infosphere DataStage v8.0
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Interesting. For grins, what was the source system of the file and what UNIX does your DataStage server run?
-craig

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