AI for IBM i in 2026: Calling AI APIs from RPG and SQL, Integrating watsonx, and What AI Can Realistically Do for IBM i Modernisation
AI intersects with IBM i in three ways: as an integration target (calling OpenAI or watsonx from RPG and SQL programs), as a development tool (using AI assistants to explain and modernise legacy RPG), and as a data platform feature (watsonx.data federating IBM i and cloud data). This post covers QSYS2 HTTP_POST for calling AI APIs directly from SQL, embedded SQL in SQLRPGLE for AI integration, JSON_VALUE for parsing responses, watsonx.ai Granite models, IBM Merlin, and a complete batch AI classification example.