DB2 V9.5 LUW Fixpack 5.
Is there in DB2 a function that returns the checksum of a string, like
the sum of UNIX?
In Unix/Linux:
[db2inst1@JULIANA-PIRES ~]$ echo "Super string bla bla bla" | sum
49605 1
Best regards.
Bruno.
Not as far as I know but if you know the algorithm it's possible to
implement your own function, possibly even in sql. I once had the
misfortune having to implement a base64 decoder in sql, not a pretty
sight ;-)
/Lennart
[...]
> Is there in DB2 a function that returns the checksum of a string, like
> the sum of UNIX?
>
> In Unix/Linux:
>
> [db2inst1@JULIANA-PIRES ~]$ echo "Super string bla bla bla" | sum
> 49605 1
No, there are no checksum functions shipped with DB2, but I wrote UDFs for
md5, seeded md5, seeded sha1 and seeded crypt.
You will need APR and APR-util to compile the UDFs.
--
Helmut K. C. Tessarek
DB2 Performance and Development
IBM Toronto Lab
Helmut and Lennart.
Thanks for reply.
Today, we use a shell script + sql commands to get this information
( checksum ).
I will check with my team what solution we´ll use.
Best.
Bruno