I have a report job which runs end of the day. i have another job which runs 4 times a day and produces a GDG version. at end of the day i have to consolidate the versions (which are created on that particular day) to produces the dataset for the report job.
Not sure whether the job runs exactly for 4 times. it may run 2 times also in a day.
so how do i concatenate the GDG version created on a particular day.
You could reference the gdg base on the dd which would get you any and all levels created that day, whether there was 2 versions, 4 versions, etc. Using DISP=(OLD,DELETE) when referencing the base will delete all versions, but keep the base. That way, you'll have an empty base after reporting, ensuring you'll always only have levels in the base created since you last ran the report. And, of course, you'll need to back up the data first if it needs to be retained.
The advantage over previous suggestions is that it is much easier to track backups because we always have an incremental generation number, (not always G0001V00, G0002V00, G0003V00, G0004V00) and it also allows you to keep as many days data as you want, without the need for deletion.