MSIR.0807 Can't declare (meth) after (meth) already invoked
A Constructor or Disallow statement in a Public or Private block specified a New or Discard method after such a method had already been explicitly invoked. Since these methods exist for all classes, whether or not they're declared, it is possible to use them before they are declared. However, as this message indicates, such a use is invalid.
Make sure the class's Public or Private block is declared before any code that uses a New or Discard message.
An Auto New setting on a variable declaration is considered an invocation of the New method, so an Auto New object should be declared after the Public and Private blocks for its class.
Message attributes:
RETCODEO=0 | Sets online return code |
---|---|
RETCODEB=4 | Sets batch (single user) return code |
CLASS=E | Error class; the message can be suppressed with the X'04' bit setting of the MSGCTL parameter |
AUDITER | Writes the message with line type ER to the audit trail |
COUNT | Increments the error count (ERCNT) parameter |
ECHO | Displays the line that caused the error |