I omitted a 'FOR' in a Inspect Tallying but got a different ERROR mssg.
Code Line was: INSPECT FIELD TALLYING SUB ALL "X". when it -
Should have ---: INSPECT FIELD TALLYING SUB FOR ALL "X".
Error mssg was:
INSPTEST.cob:9: error: missing ALL/LEADING/TRAILING before value
INSPTEST.cob:9: error: ALL, LEADING or TRAILING expected before 'SUB'
INSPTEST.cob:9: error: data name expected before ALL
All these 'errors' appear incorrect as:
1. There was an 'ALL' before value.
2. Why would ALL, LEADING or TRAILING be expected before 'SUB'.
3. There was a data name before ALL - That's what SUB is.
Perhaps -Missing 'FOR' Statement might be better or ignore it altogether.
Attached error mssg INSPTEST.err & sample program - INSPTEST.cob
Thanks for the good report. I agree that the error message in this case is more confusing than helpful. The old handling of "pure parser error" was more confusing in most cases, but obviously not in this one.
I'm using this lower-priority issue as a ping @edward-h, maybe he finds some time to look at this in the next months - in general: patches welcomed.