I am a little confused by what I am reading, but I will try to help.
From the version information, it appears that you may actually have Informix Dynamic Server and not SE.
AFAIK, the highest release of SE is 7.25UC6.
If you are in fact using SE, you do not have to specify the ONCONFIG or INFORMIXSQLHOSTS variables, but the sqlhosts file then has to be at the default location, which is $INFORMIXDIR/etc/sqlhosts. For SE, the ON* parameters are pretty much inapplicable/irrelevant, but with Online/Dynamic Server, they are vital. I am focused on SE right now, so if you're in the bigger world of Online/Dynamic Server, there are other considerations and better advice to be had from other people.
Still, I would suggest that you have a long way to go, and you're trying to eat the whole elephant in one bite. The environment variables you need to look at are {PATH, DBPATH, INFORMIXDIR, INFORMIXSERVER}. PATH must have $INFORMIXDIR/bin appended to it somewhere.
Files you have to look at are /etc/hosts, $INFORMIXDIR/etc/sqlhosts.
When you are sure those are all set up right (have you already RTFM on Informix network access?), there are other things to look at. In order to connect to the database, the server has to have a sqlexecd daemon up and running. If that is already there, then I would recommend trying to connect to the database with DB-Acesss. If you can't get in with DB-Acesss, your application doesn't stand much of a chance.
I suggest starting at the ground floor, and use the process of elimination to narrow the causes of the problem until you can isolate and address it. That will be the best use of your time and save you the most grief. Good luck.
Regards,
Joe