Migrate a Db2 unload job to the base UNLOAD utility

Proprietary

Rewrite an unload job that runs on the High Performance Unload product so that it runs on the base Db2 UNLOAD utility instead, by IBM's own option table read backwards: OUTDDN becomes UNLDDN, LOADDDN becomes PUNCHDDN, SELECT ... FROM becomes FROM TABLE, WHERE becomes WHEN, OUTMAXROWS becomes LIMIT, OUTFREQROWS becomes SAMPLE, PARALLELISM becomes PARALLEL, and the LOCK and QUIESCE pair becomes the one SHRLEVEL the base utility has for it. The EXEC card is rewritten to PGM=DSNUTILB with it, because the two programs read different dialects and a job with one rewritten and not the other fails on its first card.

Only a step that FindHpuUsage buckets MAPS_KEYWORD_FOR_KEYWORD and whose execution path resolves completely is touched. A step that leaves what it writes to the site parmlib is never rewritten, because the file it writes today is not decided in the source. A procedure or a control card member that several jobs share is rewritten only when every one of those jobs qualifies, and otherwise nothing that job set touches changes at all. Every step visited gets a row saying what was rewritten keyword by keyword, or which of those rules stopped it — including the keywords that were dropped because the base utility has nothing to write them as, which is where the file a downstream reader gets changes shape.

io.moderne.mainframe.db2.MigrateHpuToBaseUnload
mod run . --recipe=io.moderne.mainframe.db2.MigrateHpuToBaseUnload

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.