DB2 stored procedures can call external library (written in java, c etc),
so most of the things can be done through that libraries.
check the ibm development site, relevant to db2 . you will find some
stored procedures that will provide that functionality.
I have seen that a quite while ago.
regards,
mujeeb