An SQL statement such as EXEC SQL DECLARE TABLE was coded in the Procedure Division.
Resolution:
This statement cannot be coded in the Procedure Division. Move it into the Working-Storage Section and then recompile the program.