Generating a batch report happened in very old COBOL world and does not work in VSAM, CICS etc. environments. In most of the present COBOL development it is forbidden top use these old techniques.
Some instructions were used in the original batch reports:
WRITE AFTER ADVANCING
CONTROL FOOTING
SUM/COUNT/AVERAGE
PAGE/LINE COUNTER
Sometimes the WRITE AFTER ADVANCING can be found in old codes for printer control:
WRITE OUT-REC AFTER ADVANCING 1 LINE.
WRITE OUT-REC AFTER ADVANCING PAGE.
Nowadays riports are done via:
DB2/SQL
SAS
JCL SORT
REXX
Python (IBM Z Open Automation)
Java (z/OS Java)
analytics platforms