Which method reliably resets the alert flag between batch steps in COBOL?
0 reputation · 19 Sept 2022, 22:32 UTC
COBOL programs often centralize NOTIFY calls in a single paragraph and control emission with a flag variable. The language specification, however, does not define how that flag should be cleared after each batch step, leaving the reset behavior implementation‑specific.
Because NOTIFY output can be buffered differently in batch versus interactive runs, an uncleared flag may cause duplicate or missed alerts, especially on legacy compilers that treat condition‑numbers inconsistently.
What flag‑reset strategy works consistently across both execution modes? Does any compiler provide a built‑in mechanism for automatic flag clearing? Are there documented patterns that avoid manual flag management altogether?