sql code -804

I was facing sql code -804 while executing a query from cobol db2 program.  The explanation for this sql code on ibm site was described as following  

AN ERROR WAS FOUND IN THE APPLICATION PROGRAM INPUT PARAMETERS FOR THE SQL STATEMENT, REASON reason