defaultframe

undefined frame

The rule "defaultframe" gives this message when it finds instances of DISPLAY and UPDATE statements that are not using a previously defined frame.

Why use this rule?
This can be useful when you are trying to identify user interface components in your code base. It can also be helpful for applying standards.

Solution
Frames should be defined with either a DEFINE FRAME or FORMAT ... WITH statement.

In the following very simple example, the first display statement does not reference a frame and will trigger the rule.

/* myframe.p */
define frame myframe
customer.name
customer.custnum
with 1 col.

form Customer.address with frame otherframe.

find first customer no-lock no-error.
if available customer then display customer except comments.
find next customer no-lock no-error.
if available customer then display customer.name customer.custnum with frame myframe.
/* end procedure */