COBCH1880 DECLARE cannot follow non-standard ENTRY statement

The program contains a DECLARE statement used following an entry statement that occurs within a compound statement, for example, following an IF but before the corresponding period (.) or END-IF. This is not allowed.

Resolution:

Correct the code; then recompile.

Example:

The following example shows code that would throw this error.

       01 i1 binary-long.
           if i1 = 1
       entry "StrangeEntryPoint"
              declare i2 as binary-long = 3
              display i1
           end-if