Pass all the jcl codes to a COBOL variable(should be declare using OCCURS clause) and the write the line one by one to the spool using CICS commands like SPOOLClose SPOOLOpen SPOOLWrite. For more help refer CECI of CICS or CICS IBM manual.
Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!