You didn’t indicate if this was an input or output file. To answer your question I’ll assume it’s for output. There are a couple of ways to do this.
The simplest thing to do is create a batch job to periodically REPRO the VSAM data set into the GDG flat file with IDCAMS. The command to do the REPRO is very easy and you just have to make sure flat file has the correct attributes (e.g., logical record length or LRECL).
The chief advantage to this technique is you won’t have to change anything in the CICS application. Instead you would just have to develop a job to REPRO to the flat file as well as delete and redefine the VSAM cluster. The disadvantages are the VSAM file has to be closed while the job is running and the fact that the GDG data will only be up to date as of the last batch run.
As an alternative, you can define an extrapartition transient data queue (TDQ) to create the flat file directly. In CICS you define this type of TDQ with a four-byte queue name and a corresponding eight-character DD name. You must add the DD name to the CICS JCL in which you also specify the GDG’s data set name. Note that the generation number will always be +1.
The advantage is the GDG will always be current without an additional batch processes.
There are a lot of reasons not to do it this way. First, extrapartition TDQs perform poorly when compared to VSAM. Second, you will have to close the TDQ or stop CICS to see all the records. Lastly, you will have to change the online application to write to the TDQ instead of the VSAM file.
You could also write an EXCI application where the CICS is reading the VSAM file and returning the record(s) to Batch and batch then writes the desired file.