noundo

variable/temp-table/parameter [name] defined without NO-UNDO

Rule "noundo" gives this warning when it finds a "DEFINE VARIABLE" or "DEFINE TEMP-TABLE" statement without NO-UNDO.

the risc:

Slower performance, more IO to the LBI-file.

known issue:

A temp-table might be NO-UNDO without explicit definition. For example:

   DEFINE TEMP-TABLE tt_testB LIKE tt_testA.

In this example, temp-table tt_testB is implicitly NO-UNDO if tt_testA was explicitly defined with NO-UNDO.
We can't verify this in this little code snippet, but Prolint might have been able to figure it out... but Prolint doesn't care. It simply
will raise the warning "temp-table 'tt_testB' defined without NO-UNDO".

Personally I don't believe this is a bug in Prolint. After all, tt_testB may be NO-UNDO but it really is defined without NO-UNDO, isn't it?

how to solve this:

Be explicit. Make a habit of adding NO-UNDO to all variables, parameters and temp-tables.


It is not necessary to add NO-UNDO to parameters for (external) DLL functions.


If you really want a temp-table to be not NO-UNDO you might also add the undocumented option UNDO, although some will argue that undocumented features should never be used:

DEFINE TEMP-TABLE ttCustomer UNDO
   FIELD CustNum AS INTEGER.

How to suppress these warnings:

You can put directive {&_proparse_ prolint-nowarn(noundo)} directly before
the DEFINE keyword.
See also: suppress warnings.

implementation:
This rule is implemented in Turbolint.