15 pts.
 Expand Counter Size in WRKQRY
I use WRKQRY to produce a summary file. I use '5' to indicate the counting on a special field. The counts is larger than 9,999,999. I got field overflow. How to expand the counter field?

Software/Hardware used:
ASKED: October 5, 2012  9:25 PM
UPDATED: October 8, 2012  12:32 PM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question. Michael Tidmarsh   11,405 pts. , chen7555   15 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Your best choice is to stop using the old, almost obsolete WRKQRY function. Use STRQM to create Query Manager queries instead.
 
But if you must use WRKQRY for some strange reason (and I’d like to know what it is), you can usually only make that type of change for a summary field by creating Result Fields with larger sizes. In your case, though, I’m not at all sure what can increase a ‘Count’ field. Counting more than ten million of anything seems a little extreme for WRKQRY. There might not be any good way of doing it.
 
You could just create a SQL VIEW that does a COUNT() and use WRKQRY to report it, I suppose. That would give you ‘Count’ values as big as you might imagine.
 
Tom

 108,240 pts.

 

There is no way to make the counter field.  As Tom suggested you could make a result field (15,0) and set it’s value = 1.    Then sum the result field. 

 44,190 pts.