Compare , CRC32, CheckSum functions and their limitations

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
kollurianu
Premium Member
Premium Member
Posts: 614
Joined: Fri Feb 06, 2004 3:59 pm

Compare , CRC32, CheckSum functions and their limitations

Post by kollurianu »

Can some one tell me are there any limitations in using the following functions:

1.Compare
2.CRC32
3.CheckSum

and what is the difference between CRC32 and CheckSum?

Can i just compare strings with the following expression

"String1"="String2" or "String1" <> "String2"


Any Inputs are greatly appreciated.

Thank you all.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Kollurianu,

the best and 100% guaranteed method is to do a String1=String2 comparison. But if the string is 500 characters long it sometimes makes sense to store a short CRC32'd string instead of the original and then do a comparison on the smaller value. The upside is drastically less storage space needed, the downsides are (a) more CPU/processing time to calculate the algorithms and (b) a slight possibility of getting different strings with the same CRC32 code
kollurianu
Premium Member
Premium Member
Posts: 614
Joined: Fri Feb 06, 2004 3:59 pm

Post by kollurianu »

Thank you so much Arnd.
pnchowdary
Participant
Posts: 232
Joined: Sat May 07, 2005 2:49 pm
Location: USA

Post by pnchowdary »

Hi Anu,

Like Sainath told in one of the previous posts "CRC32 is a 32 bit fn and CheckSum is a 16 bit fn".

So you are better of using CRC32 than CheckSum as the former has more probability of returning different checksum values for two different input columns.
Thanks,
Naveen
kollurianu
Premium Member
Premium Member
Posts: 614
Joined: Fri Feb 06, 2004 3:59 pm

Post by kollurianu »

Thank you Naveen for ur reply.
Post Reply