Problem:
Specifying a 'CODE' clause in the RD (Report Descriptor). This allows multiple reports to be included within a single report file...
The two(2) report 'code' characters that are included in the final report output, at the beginning of each line is problematic.
Resolution:
The CODE clause is not required to write more than one report to a file. This can be done without the CODE clause.
select my-file assign to "a.pnt".
file section.
fd my-file report report-1 report-2.
report section.
rd report-1.
1 my-detail type detail
column 1 line plus 1 pic x(10) source "abcd".
rd report-2.
1 my-detail-2 type detail
column 1 line plus 1 pic x(10) source "efgh".
procedure division.
open output my-file
initiate report-1 report-2
generate my-detail
generate my-detail
generate my-detail
generate my-detail
terminate report-1
generate my-detail-2
generate my-detail-2
generate my-detail-2
generate my-detail-2
terminate report-2
close my-file