COBSQ0415 Statement not allowed in the PROCEDURE DIVISION.

A SQL statement such as EXEC SQL DECLARE TABLE was coded in the Procedure Division. This statement cannot be coded in the Procedure Division.

Move the statement into the Working-Storage Section then recompile the program.