Skip to content

v0.9.43

Choose a tag to compare

@github-actions github-actions released this 03 Oct 17:23
· 102 commits to main since this release

This release fixes the 24 issues reported against v0.9.42 (#1-#22, #24, #25).
These changes have not yet been checked on a real IBM i, because PUB400 is
down. A conformance run will follow when it is back.

Behaviour changes to be aware of

  • Embedded SQL runs under commitment control, as CRTSQLRPGI's default
    COMMIT(*CHG) does on IBM i. Each change waits for COMMIT, and ROLLBACK
    now undoes it; before, every statement was committed as it ran.
    Changes still pending are committed when the program ends normally or
    at DISCONNECT, and rolled back when it ends in error. EXEC SQL SET OPTION COMMIT = *NONE; turns commitment control off (#2).
  • SQLCODE is the code Db2 for i gives for the SQLSTATE, for example
    -204 for a missing table or -803 for a duplicate key, not the driver's
    native error number negated. An SQLSTATE with no Db2 equivalent keeps
    the native number (#22).
  • A NULL fetched into a host variable that has no null indicator is
    SQLCODE -305 / SQLSTATE 22002, and the variable keeps its value (#25).
  • A USROPN file is opened by OPEN. Before, USROPN was ignored and the
    file opened itself. Any other operation before OPEN is status 1211 (#20).
  • In fixed-form source, a free-form statement outside /FREE (positions
    6-7 blank, code in 8-80) is now compiled. These lines used to be
    dropped without a message (#21).
  • Calls are checked against the prototype (RNF7535). An argument of
    another type, or a non-variable passed to a parameter passed by
    reference, is now an rpgc error instead of a C++ compile error. A
    subfield of a CONST parameter can't be assigned (#17).

New

  • EXTFILE('path') and EXTFILE(var) choose the file a program-described
    file opens. OPEN, CLOSE, CLOSE *ALL and %OPEN, with the E extender (#20).
  • Free-form DCL-F name DISK(n) declares a program-described file, and
    USAGE(*INPUT:...) now parses (#21).
  • GET DIAGNOSTICS CONDITION 1 with MESSAGE_TEXT, MESSAGE_LENGTH,
    RETURNED_SQLSTATE, DB2_RETURNED_SQLCODE and DB2_MESSAGE_ID, and the
    SQLCA's SQLERRMC and SQLERRML (#22).
  • Exit status: halt indicators *H1-*H9 end the program in error with
    status n. rpg_set_exit_status (an OpenRPG extension called through an
    EXTPROC prototype) sets a status for a normal end (#24).
  • Unnamed data structures: DCL-DS *N, and a fixed-form DS with a blank
    name (#15).
  • A data structure can be used as a character value: DSPLY, assignment,
    concatenation, comparison and the string built-ins (#13).
  • %INT, %DEC, %FLOAT and the other numeric conversions take a character
    operand (#8).
  • Data structure subfields can be SQL host variables, written as
    :ds.sub or as :sub for a DS that isn't QUALIFIED (#6).

Fixes

  • Fixed-form subfields that share From/To positions now share storage (#5).
  • TEST(DE) takes a qualified subfield or an array element (#7).
  • INZ(*SYS) on a fixed-form D-spec (#9).
  • Subroutines in a subprocedure: an EXSR before the BEGSR now
    compiles (#10).
  • OVERLAY subfields can be read through a LIKEDS parameter or a LIKEDS
    subfield (#16).
  • EXEC SQL can be followed by a line break (#18).
  • Fixed earlier, after v0.9.42 shipped: RETURN in a subroutine (#1);
    %EDITC and O-spec edit code lengths and alignment (#3, #4); a DS
    declared in a DCL-PROC (#11); SND-MSG *ESCAPE from the main procedure
    (#12); INZ on a DS or a subfield (#14). The g++ format-truncation
    warning (#19) came from code that was replaced, so it should be gone.

343 OpenRPG tests and 28 interactive display-file tests pass. A test can
now name its expected exit status in testN.exit, and error tests must be
rejected by rpgc itself, not by the C++ compiler.