Starter,
i don't know in what environment you are working, but COBOL is perfectly capable of processing (reading and/or writing) multiple files. Open two output files, or as many as you fancy, and write your output (= processed data) to one and your error report lines to another. Whether the error report file is actually written to a file or to a printer is no issue.
Good luck !