I have written a COBOL program to write out a single batch file of HIPAA 270 transactions. The single file contains multiple ISA/IEA segments. This has been fine in the past, but last year it created 48 ISA/IEA segments. My problem is that when the program finishes, I'm having to break out each ISA/IEA segment into its own file for further processing. I'm doing this manually. Without creating enough FDs to handle an unknown number of output files, and I'm not an assembler programmer, but many years ago I worked in a shop that used a called assembler routine that could have named and created output files within a COBOL program so in situations like this no further manipulation was needed. Can anybody help me with how this could be done? Or maybe provide me with an assembler routine that can do this kind of thing?