Page 1 of 1

Compare files taken from FTP

Posted: Thu May 07, 2009 6:32 am
by ganesh.soundar
Hi,

I have a requirement to fetch two files from FTP server and then to perform checksum operation on those files. Need to identify those files are identical or different using the checksum value.

I can perform column or record level checksum using Basic transformer. But no clue of how to do this comparison for files. Please let me know how to do this.

Regards,
Raja

Posted: Thu May 07, 2009 6:45 am
by Sainath.Srinivasan
Checksum is a name and not a fixed logic.

You need to be asking this to your business or source team of file.

Posted: Thu May 07, 2009 6:48 am
by chulett
Right, whomever gave you that requirement should also be able to tell you how you would calculate that 'checksum' value in your organization. Hopefully some sort of command line utility, easily scripted.

Posted: Thu May 07, 2009 7:21 am
by LNarayan
chulett wrote:Right, whomever gave you that requirement should also be able to tell you how you would calculate that 'checksum' value in your organization. Hopefully some sort of command line utility, easily scripted.
Thanks. Apart from checksum is there any stage in DS to identify the source files are identical or different?

Posted: Thu May 07, 2009 7:43 am
by chulett
At the file level? Not directly, no. This is where you would leverage your operating system, something easily incorporated into a DataStage job stream using a Sequence job, however.

Posted: Thu May 07, 2009 4:48 pm
by ray.wurlod
Is there any reason you can't use the UNIX command diff to perform the comparison? This could be invoked from an Execute Command activity in a job sequence.