Page 1 of 1

Issues with Complex Flat File stage, reading Binary data

Posted: Mon Jan 11, 2010 10:40 am
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?

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

Posted: Thu Jan 21, 2010 8:30 am
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.

Posted: Thu Jan 21, 2010 9:26 am
by chulett
Interesting. For grins, what was the source system of the file and what UNIX does your DataStage server run?