Skip to content

v0.9.45

Choose a tag to compare

@github-actions github-actions released this 03 Oct 21:08
· 99 commits to main since this release

Program calls now find the called program when they run, as on IBM i
(#23), and the runtime compiles without GCC warnings (#19). These changes
have not yet been checked on a real IBM i, because PUB400 is down.

Behaviour changes to be aware of

  • Every program call (CALLP of an EXTPGM prototype, or CALL) is resolved
    at run time from a shared library. Callers no longer link a called
    program's object file. Build each called program with the new
    rpgc -shared ORD100.rpgle, which produces ORD100.so, ORD100.dylib or
    ORD100.dll, named after the source file, and put it next to the caller
    or on PATH. A called program written as a NOMAIN module needs to become
    a program: give it an *ENTRY PLIST, or DCL-PI *N in free form.

New

  • Dynamic program calls (#23):
    • rpgc -shared builds a program that others call.
    • EXTPGM(variable) and CALL with a field in Factor 2 choose the program
      at run time. EXTPGM with no name means the prototype's own name.
    • The program is looked for in the caller's directory, then on PATH,
      then wherever the system loader looks. It is loaded on its first call.
    • A program that can't be found is status 211. One that ends in error is
      status 202 in its caller. CALLP(E) now reports an error's own status.
    • Parameters are passed in IBM i's formats (CHAR as bytes, INT as a
      native integer, PACKED as packed decimal, ZONED as digits), so a
      called program can be written in C, or be a GnuCOBOL module.
  • Free-form programs can receive parameters, with DCL-PI *N among the
    main statements.

Fixes

  • GCC no longer warns about the runtime on any compile (#19). Numbers are
    now formatted into strings sized to fit, which also fixes %CHAR of very
    wide decimal fields being cut short. The display-file runtime gets the
    same fix.
  • Windows: an SQL program with a field named MSG compiles (also in v0.9.44).

Known issues

Found while testing this release, and not yet fixed: #26 (INT(20) is 32-bit),
#27 (INZ(*ON) on an indicator is ignored), #28 (adding a duration to a
timestamp leaves it unchanged), and #29 (an indicator can't be concatenated
to a character value).

349 OpenRPG tests, 39 dspfc tests and 28 interactive display-file tests pass.