That's an awful lot of data to chug through with REXX.
I'll leave with this. For COBOL search for any of the known methods of performing a dynamic allocation (BPXWDYN, PUTENC ,or IKJTSOEV and IKJEFTSR). Or, use your SORT to read through the data, find the record number where each new policy number starts, and have it generate a series of appropriate SORT control statements and the necessary DD statements for inclusion in a subsequent job, or optionally create and submit a whole new job.