MPLIE00056S SQLCA declaration in a nested block (PROCEDURE or BEGIN) is not allowed. It is allowed only in outermost block(s) or in a PACKAGE.

SQLCA declaration (usually via include of SQLCA) in a nested block (PROCEDURE or BEGIN)is not allowed.

It is allowed only in outermost block(s) or in a PACKAGE.

Resolution:
Simply remove the declaration from the nested block. If you wish, you may add it to the outermost PROCEDURE or to the PACKAGE.
Module:
MPLIEXEC.PLI