Binary datatype issue

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
synsog
Premium Member
Premium Member
Posts: 232
Joined: Sun Aug 01, 2010 11:01 pm
Location: Pune

Binary datatype issue

Post by synsog »

Hi All,
we are migrating PX jobs from Ds 7.5 windows to DS 8.5 linux os.we have the datatype binary for one of the column. the incoming values are same for both the DS 7.5 code and DS 8.5 code .the output data mismatches in bothe versions.below is example and datatype is binary (20).please suggest.

Incoming value -ds8.5
00510353050000000000
output result
{0 00 0 00 5 00 1 00 0 00 3 00 5 00 3 00 0 00 5 00}

Incoming value -ds7.5
00510353050000000000
output result
{0 0 5 1 0 3 5 3 0 5 0 0 0 0 0 0 0 0 0 0}
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

How are you getting your display values? Might the problem lie in the display of the binary value instead of containing a bad value?
synsog
Premium Member
Premium Member
Posts: 232
Joined: Sun Aug 01, 2010 11:01 pm
Location: Pune

Post by synsog »

Hi Andrew,

even in the target database also , it shows the wrong values for DS85 load where as the DS 75 out put displays the correct values.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Can you still test on the old 7.5? If yes, make a simple job that outputs to a text file and uses a row generator stage for the 1 sample row and see if you still have the error - that can then be submitted as a bug to IBM. If the error isn't reproduceable then you'll have to experiment with the database, as the cause might lie not in Datastage but with the DB.

But it sounds like a bug that needs to be addressed.
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

This looks to me to be an issue with unicode vs non-unicode string data. The example from IS 8.5 appears to be a unicode string (2+ bytes-per-character), while the DS 7.5 example appears to be a non-unicode string (1-byte-per-character).

As you're moving from Windows to Linux: how was the source file created for the DS 8.5 job? If you saved it in some text editor as a unicode file, you probably need to either a) recreate it as a non-unicode file or b) read the field as a unicode string rather than a binary field.

You can use the od -xc command in linux to look at a dump of the file.

Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
synsog
Premium Member
Premium Member
Posts: 232
Joined: Sun Aug 01, 2010 11:01 pm
Location: Pune

Post by synsog »

Hi Andrew,

yes we, have Ds 7.5 old server too. i had created a simple job by taking row generator stage with column datatype Binary and writing to text file. so the output data in the Datastage 7.5 is different as compared to datastage 8.5 . so this means the datastage 8.5 has bug int it ? or fix need to applied..please suggest
synsog
Premium Member
Premium Member
Posts: 232
Joined: Sun Aug 01, 2010 11:01 pm
Location: Pune

Post by synsog »

In transformer, the data type is defined as binary ,where the mapped columns have char ,int dataype which conatins numeric values .pls suggest
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

When displaying data type Raw (= binary) each byte is shown as a single character if that character is a printable character, or as a two digit hex number if the character is non-printable. The 00 characters in your data are ASCII NUL characters (Char(0)).

Your 8.5 raw string shows Little-Endian representations of two-byte character representations of the characters you have in your 7.5 output.

You would need to convert your string to an integer or decimal number to be able successfully to store it as an integer.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
synsog
Premium Member
Premium Member
Posts: 232
Joined: Sun Aug 01, 2010 11:01 pm
Location: Pune

Post by synsog »

but the derived columns which have char data type comes from the mainframe file with EDCBIC character set and dataformat in Binary.pls suggest
FranklinE
Premium Member
Premium Member
Posts: 739
Joined: Tue Nov 25, 2008 2:19 pm
Location: Malvern, PA

Post by FranklinE »

synsog wrote:but the derived columns which have char data type comes from the mainframe file with EDCBIC character set and dataformat in Binary.pls suggest
What is the definition of the data on the mainframe file? Do you have a table definition for it (Cobol copybook, I'm assuming)? Also, how the data is transferred (binary vs. text) has no relevance to how the data is parsed by DataStage. For example, I use FTP Enterprise to read EBCDIC directly into the job, with a transfer type of binary and the Cobol copybook defining every column as it is read.
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson

Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
synsog
Premium Member
Premium Member
Posts: 232
Joined: Sun Aug 01, 2010 11:01 pm
Location: Pune

Post by synsog »

ya, its based upon copy book definitionand more over when i tried to convert to integer the derived columns that are mappped to binary column.still it doesn ot gives the correct result as of DS 7.5 version .
FranklinE
Premium Member
Premium Member
Posts: 739
Joined: Tue Nov 25, 2008 2:19 pm
Location: Malvern, PA

Post by FranklinE »

I'm not sure I follow you, so allow me to ask some basic questions.

Is your mainframe file (EBCDIC) written using the same copybook?

What is your DataStage method (stage, sequence) for reading the mainframe file? Is it a native read (input stage to next stage) or is there a separate download to a sequential file?

Can you give an example of a "binary" column on the mainframe record which you are trying to derive to another type (like integer)?

The important point here is that DataStage does not "care" how the data is stored on disk. If you read it the exact same way it was written, you should not have the problems you are describing.
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson

Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
synsog
Premium Member
Premium Member
Posts: 232
Joined: Sun Aug 01, 2010 11:01 pm
Location: Pune

Post by synsog »

the same code works with expected reult in 7.5 version .but where as in the 8.5 version it doesnt gives the desired out put
FranklinE
Premium Member
Premium Member
Posts: 739
Joined: Tue Nov 25, 2008 2:19 pm
Location: Malvern, PA

Post by FranklinE »

Then there is a difference in 8.5 that you haven't found yet. Without a better understanding (answers to my previous questions), I can only guess.
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson

Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
Post Reply