Rosti:
Here's a trick I learned from Jonathan Leffler, the heavy-weight of all Informix heavy weights:
SELECT ODB_DBName
FROM SysMaster:"informix".SysOpenDB
WHERE ODB_SessionID = DBINFO('sessionid')
AND ODB_IsCurrent = 'Y';
SysOpenDb isn't a table, but a view into the SysMaster database.
Regards,
Ed