Recently you asked how to make a PRTF on AS400
And another question was how to use a DSPF in a COBOL program.
If you would please review those two answers, you would have your anser to this question.
1. Create your printer file.
2. In your COBOL program you wouyld do WRITES to the PRTF Formats.
Here is a sample of assigning a printer in COBOL
SELECT ACH-REPORT-FILE ASSIGN TO PRINTER-ACHRPT.