Compare stage

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
Ragunathan Gunasekaran
Participant
Posts: 247
Joined: Mon Jan 22, 2007 11:33 pm

Compare stage

Post by Ragunathan Gunasekaran »

Hi,
I am trying to understand the compare stage in datastage . The manual states that by comparing the key columns(Columns on which the change has to be detected) from the input datasets the result codes are output.

Say i have a key column "col_a" in both the input datasets.
Hence

Code: Select all

if First.Col_a <second.col_a result code should be -2
if First.Col_a >second.col_a result code should be 2
If i have a two key columns then how this result code is achieved ?
.... Any clues on this please
Regards
Ragu
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

A buffer comprising all the columns defined as "Key" is the basis of comparison.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Ragunathan Gunasekaran
Participant
Posts: 247
Joined: Mon Jan 22, 2007 11:33 pm

Post by Ragunathan Gunasekaran »

I hope that the answer would be Depending of the order of the keys defined in the stage.
The key defined at the top of the declaration would be used first for a match and the second key is used for comparison. If the second key is less or greater depending upon that the comparison result is recorded in the output
Regards
Ragu
Post Reply