From surfing on www.iiug.org (Informix International User Group), I have found a not-so-easy solution.
(1) Get the reference constraint data from the constraint name (you can get all the constraints for the table by replacing "AND sc.constrname =?" With "AND st.tabname MATCHES?"). This operator selects more fields than necessary here, because they may be interesting in other situations.
SELECT si.part1, si.part2, si.part3, si.part4, si.part5, si.part6, si.part7, si.part8, si.part9, si.part10, si.part11, si.part12, si.part13, si.part14, si.part15, si.part16, st.tabname, rt.tabname as reftable, sr.primary as primconstr, sr.delrule, sc.constrid, sc.constrname, sc.constrtype, si.idxname, si.tabid as tabid, rc.tabid as rtabid FROM 'informix'.systables st, 'informix'.sysconstraints sc, 'informix'.sysindexes si, 'informix'.sysreferences sr, 'informix'.systables rt, 'informix'.sysconstraints rc WHERE st.tabid = sc.tabid AND st.tabtype != 'Q' AND st.tabname NOT MATCHES 'cdr_deltab_[0-9][0-9][0-9][0-9][0-9][0-9]*' AND rt.tabid = sr.ptabid AND rc.tabid = sr.ptabid AND sc.constrid = sr.constrid AND sc.tabid = si.tabid AND sc.idxname = si.idxname AND sc.constrtype = 'R' AND sc.constrname = ? AND sr.primary = rc.constrid ORDER BY si.tabid, sc.constrname
(2) Use part1-part16 to determine which column is affected by the constraint: the [n] part, which contains a value other than 0, contains the column number of the column used. Use (3) to find the column name.
If constrtype is "R" (link), use the following statement to search for parts of the link table:
SELECT part1, part2, part3, part4, part5, part6, part7, part8, part9, part10, part11, part12, part13, part14, part15, part16 FROM 'informix'.sysindexes si, 'informix'.sysconstraints sc WHERE si.tabid = sc.tabid AND si.idxname = sc.idxname AND sc.constrid = ?
(3) tabid and rtabid (for constraint references) from (1) can now be used to get table columns:
SELECT colno, colname FROM 'informix'.syscolumns WHERE tabid = ? -- tabid(for referenced) or rtabid(for referencing) from (1) AND colno = ? -- via parts from (1) and (2) ORDER BY colno
(4) If constrtype is "C", then get the control information as follows:
SELECT type, seqno, checktext FROM 'informix'.syschecks WHERE constrid = ?
Pretty hairy really