Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

checking if a numeric field has gone over the size limit for the field

Status
Not open for further replies.

andymc1

Programmer
Jun 28, 2002
23
CH
hello

i am running a piece of sql to do a count and want to know how to check if the count into field has gone over the max value of that field (null indicator????)

all help much appreciated
Andy
 
Hi,

I assume you use the SQL combined with COBOL.

Checking before is perhaps the easiest way.

Define the field very large. There is always a practical limit.

The ON SIZE ERROR option can be helpful if it is your own source and not that of the precompiler.

ADD ... ON SIZE ERROR

Regards,

Crox

 
You can use SQLCODE to find out whether the count has gone over the field SIZE limit.

SQLCODE will contain 8115 (check your documentation) on a NUMERIC OVERFLOW.

Dimandja
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top