TomLiotta
18790 pts. | Feb 2 2010 7:45PM GMT
ElTerrifico is basically right about OFLIND(*In80). (And the logic nesting levels.) If you’re going to be doing your own counting and setting *IN80 on and off, then you need to take care about doing it while the system is also counting lines and setting the indicator on. Either you should do it, or you should let the system do it.
Personally, I’d say it’s bad form to do the counting yourself. That’s especially true if you use constants to set limits. It goes against the point of having externally-described files in the first place. You aren’t counting lines on your display file. Why count them on your printer file? This is why printer files have an OVRFLW() attribute.
Also, I’m a little confused about these lines:
C @POLNO Chain LMCHPR 20 C If %found
…and:
C If *In20 = *Off C Eval Cntnopol = Cntnopol + 1 C Endif
If 20 is the NR indicator, then it will always be off at that point. You can’t get there unless the earlier %FOUND was on.
Two additional minor items:
C If Cntnopol = 31
That should probably be:
C If Cntnopol > 30
I don’t see it making any difference in your existing logic, but it might make a difference as you develop the program more.
And:
C write HEAD01 C write SUBHEAD
Since those always seem to be written together, why have them be separate record formats? Just make one record format that prints both of them with a single WRITE statement.
Tom






