If you haven't done so yet, take a look at Deno... I know bun is getting more attention, but IMO Deno works much better in terms of a shell scripting environment.. single executable, directly reference your packages (npm, jsr, http(s)), and no separate install step or node_modules (shared cache).
And yeah, not sure that I'd pull Cobol into anything at this point.. even mainframes have a lot more options in terms of recent-ish languages.