A binary distribution of Lua for z/OS, with batteries


Lua4z is a binary distribution of the Lua programming language, with "batteries" (a collection of extension libraries), for the IBM® z/OS® mainframe operating system.

Lua4z runs in MVS® batch, TSO/E batch and foreground (including ISPF), and z/OS UNIX®.

Lua4z versus Lua

Lua4z is based on the official Lua distribution, but there are significant differences.

Lua4z is based on Lua 5.1.5

Lua4z is deliberately based on a back-level version of the official Lua distribution. This version was chosen primarily for the broadest compatibility with existing extension libraries. Lua4z does not keep in step with new releases of the official Lua distribution.

Binary, not source

The official Lua distribution is a source distribution. You need to compile the source into binaries for your platform before you can use it.

Lua4z is a binary distribution for the IBM z/OS operating system. You don't need to compile it. You just install it and use it.

With batteries

The official Lua distribution includes the core programming language and the standard libraries.

Lua4z is a distribution with batteries: it includes the core programming language, the standard libraries, and a collection of extension libraries.

Some of the included extension libraries were developed specifically for z/OS. Most are existing, multi-platform libraries.

Lua4z includes the bit32 standard library, backported from Lua 5.2.

Lua4z is not open source

The official Lua distribution is open source. All of the extension libraries included with Lua4z, except for those developed for Lua4z, are open source.

Lua4z is not open source. The extension libraries developed for Lua4z are not open source.

Before downloading Lua4z, you must agree to the terms of the software license agreement.

Source differences

Lua4z introduces some z/OS-specific tweaks to the source code of the Lua core, some standard libraries, and some extension libraries. In some cases, these tweaks have no effect on external behavior; the tweaks fix z/OS-specific issues to make the code work as it does on other platforms. The Lua4z documentation only describes changes to external behavior, not tweaks to make the code work on z/OS.

If you download the original version of an extension from the extension developers, it might not work on z/OS, or it might exhibit unexpected behavior.

Lua4z-only features

Lua4z adds new functions to the following standard libraries:

Lua4z includes LuaISPF, an extension library for using z/OS ISPF services.

Lua4z tolerates EBCDIC 037-encoded square brackets in Lua programs.

Lua4z includes an MVS version of the Lua interpreter that introduces the following MVS-specific features:

  • LUA ddname for specifying the location of Lua programs
  • LUACONF member for setting environment variables
  • Ability to specify Language Environment runtime options