COBCH0322 Cannot reference DEBUG-ITEM outside declaratives

You have referred to your COBOL system-generated data item DEBUG-ITEM in a procedure that is not in the Declaratives Section of your program's Procedure Division. References to DEBUG-ITEM are permitted only in the Declaratives Section.

Resolution:

Delete the reference to DEBUG-ITEM, or move it to the Declaratives Section.