-802 error for count(*) query for a DB2 table

Ask question on - DataBase Concepts, IBM Mainframe DB2, DB2/UDB, DB2 Tools, SQL , DB2 programming with languages like COBOL, PL1.

Moderators: Kalicharan, Moderator Group

Post Reply
srilata83
Member
Posts: 9
Joined: Thu Apr 02, 2009 2:58 pm

-802 error for count(*) query for a DB2 table

Post by srilata83 » Thu Aug 20, 2009 4:21 pm

Hi,
I am trying to query a big table which contains huge data,I just tried to check the no of records of table, i have run the query for COUNT(*) in QMF, But i am not getting the result , i am getting an error -802 ,saying commit frequency must be greater than zero.
Is there any way of getting the count?
I tried in platinum tool also, but its N/A over there in 'No. of rows' field.

Please help me in this regard.

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Thu Aug 20, 2009 4:45 pm

i am getting an error -802 ,saying commit frequency must be greater than zero
Don't know who told you that, but you are being mislead.

use the IBM LookAt site.

this link provides the explanation for a neg 802 sqlcode.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Fri Aug 21, 2009 10:11 am

In addition to what Dick has suggested, please show us the query you use and the error messages.
Regards,
Anuj

srilata83
Member
Posts: 9
Joined: Thu Apr 02, 2009 2:58 pm

Post by srilata83 » Fri Aug 21, 2009 10:19 am

Hi,
My problem is solved now.
Actually the result of my query (i.e. No.of records in my table ) is out of range, it was crossing the limit ,so i was getting -802 error.
Now i modified the query as COUNT_BIG(*) and getting the actual result. :D

Thanks......

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Fri Aug 21, 2009 10:26 am

That's nice, thanks for letting us know the final solution you used. :)
Regards,
Anuj

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others