In W-S
05 FORMATTED-INTEGER PIC Z(04)9.
05 FORMATTED-CURRENCY PIC Z(08)9.99.
in 700
DISPLAY 'Total Payroll Recs : ' PAYROLL-COUNT.
becomes
MOVE PAYROLL-COUNT TO FORMATTED-INTEGER.
DISPLAY 'Total Payroll Recs : ' FORMATTED-INTEGER.
and follow the bouncing ball for the other display items.
MOVE TO /DISPLAY FORMATTED-CURRENCY if that's appropriate.
(and of course, identifier names are your choice). Also your choice to use a PIC
of Z(02),Z(03),Z(02)9.99.
if you want thousand-separator commas.
BTW - you call 700
twice - once at end-of-file, then again from the mainline. This will give you the display twice and probably an error too, sice you will be attempting to close a closed file.