Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
Suggest you remove this. . . It is not supported any more by the current compiler. It is also not part of IDMS - it was a COBOL feature.
Simply ON 1 means what?
Which variable is checked if it contains 1?
That means that the code will be executed only 1 time.
ON used an internal variable - if i remember. . .
Long ago, some programs were written to say ON 1 AND EVERY 50 to control advancing a report to a new page and print the headers each time 50 more lines had been printed. ON was also useful for sampling rather than processing every record.
The things that could be done with ON were handled by defining a counter and controlling the process with a bit of actual code.
Long ago (mid-70's) many organizations limited the use of ON to a first-time switch (as your posted code does) for anything that was to be other than test.