How do you call an external C function from a SQL stored procedure?
hash_md5 is a C-UDF, which must be installed. Without qualified object name it will only be found if it's created in TD_SYSFNLIB or SYSLIB or the current session default database.
This should work:
set l_hash = mydb.hash_md5('abc');