Guru: SQL Sequences In RPG Let Db2 Handle The Counting
June 1, 2026 Gregory Simmons
There is something deeply satisfying about letting the database do the counting for you. In a world where we have spent decades hand-rolling identifiers, guarding them with locks, and hoping no job collides with another, SQL sequences feel like discovering a patch of mushrooms that quietly regenerate overnight. You stop worrying about scarcity and start focusing on what matters.
In a procedure driven RPG system, this is exactly the kind of responsibility we want to isolate. Generating a new identifier is not business logic. It is not validation. It is not formatting. It is a single, well-defined action that deserves …
Read more
There has never been anything wrong with IBM i job logs themselves. They are exhaustive, consistent, and remarkably detailed. When something fails, the job log contains the truth. The issue has always been consumption. Large QPJOBLOG files can run thousands of lines (or