There is no way to programatically determine this unless you have been extreamly consistant in your naming of everything.
Assuming that you only have one INFORMIXDIR (certainly not always the case) you could look at you sqlhosts files to determine instance names. You would then have to tie them to the onconfig somehow - either by a naming standard or search for files with DBSERVERNAME, etc.
All said, it would probibly just be easier to maintain a list of instances with the path to their environment shell script. After all, you have to start and stop them somehow. Are they not indirectly started though inittab and shutdown?