Oninit® SQLMorph — Overview
The Oninit® SQLMorph converter takes Informix Stored Procedure Language source and emits an equivalent compiled C UDR using the Informix DataBlade mi_* API, registered under the same name as the original SPL so existing call sites do not change. The interpreted SPL becomes a compiled shared object linked against $INFORMIXDIR/lib/libifdmi, with cursor loops expanding to mi_open_prepared_statement / mi_get_result / mi_next_row, and exception handlers expanding to SQLCODE checks against the database server connection.
Beyond the Informix C UDR target, the same parser and IR drive emitters for MSSQL T-SQL, MySQL stored routines, and Oracle PL/SQL, so a single SPL source can be retargeted to any of those vendors without re-parsing. The non-Informix backends produce native procedural SQL only — no C / CLR / external-procedure bindings — matching how each vendor expects stored logic to ship.
SQLMorph is CLI-first: real customer migrations stream a directory of .sql files through sqlmorph -t informix-udr -o out, with one bundle written per procedure (C source + Makefile + CREATE FUNCTION install script + a report flagging anything the templates could not auto-translate). The web demo on this site exists to show what the output looks like — production runs go through the CLI so files of any size and project layout are supported.
At a glance
| Topic | Detail |
|---|---|
| Inputs | One or more Informix SPL files (CREATE PROCEDURE / FUNCTION). |
| Targets | informix-udr, mssql, mysql, oracle. |
| Informix output | C source using mi_* + CREATE FUNCTION install SQL. The build Makefile is published at https://www.oninit.com/sqlmorph/Makefile — drop it next to the generated .c files and run make. |
| Vendor output | One native .sql file per procedure (T-SQL / MySQL / PL/SQL). |
| Engine | Hand-rolled Informix SPL parser → typed IR → per-target template emitters. Anthropic API fallback for unmappable expressions. |
| Diagnostics | Per-procedure REPORT.md flags every SPL construct the auto-translation skipped, with file/line and a human-readable note. |
| Interface | CLI (production); PHP web UI (this site, demo only). |
Use the Convert Demo to paste or upload a small SPL fragment and see the generated output for any of the four targets.
Once the converted UDRs run real workloads, the Informix optimiser
may pick different access plans than the original SPL produced.
Analyse your
post-migration query plans with DrWatson → — capture
sqexplain.out via SET EXPLAIN ON and upload
through the portal; DrWatson's PLAN-* rule family flags
full-table-scans, nested-loop joins on unindexed inner tables, and
related plan-quality regressions.