The lobLib.getBlobLen() system function returns the number of bytes in the value referenced by a BLOB variable.
lobLib.getBlobLen(blobVariable BLOB in) returns (result BIGINT)