I was wondering if there was any implementation of something like MVS Generation Data Groups on Unix.
In MVS, if you define a GDG named A.B.C, you can access multiple versions of the file. The current version would be A.B.C(0). The previous version would be A.B.C(-1). The next version would be A.B.C(+1).
The current version is fixed at the start of a batch job, so you can refer to A.B.C(+1) multiple times in the same job and refer to the same file.
Under the covers, the actual files have names like A.B.C.G0001V00, A.B.C.G0002V00, A.B.C.G0003V00, etc. When you define the GDG, you can specify how many versions to keep, and the version numbers in the file names roll over.
This was very useful in MVS daily batch JCL streams, and I can see some uses for it in Unix shell scripts.
This article lays out a specification for GDGs on Linux. It doesn't supply any code, but suggests it would take about three days to write.
If I don't find someone who has already implemented this, I may have to do it myself.
In MVS, if you define a GDG named A.B.C, you can access multiple versions of the file. The current version would be A.B.C(0). The previous version would be A.B.C(-1). The next version would be A.B.C(+1).
The current version is fixed at the start of a batch job, so you can refer to A.B.C(+1) multiple times in the same job and refer to the same file.
Under the covers, the actual files have names like A.B.C.G0001V00, A.B.C.G0002V00, A.B.C.G0003V00, etc. When you define the GDG, you can specify how many versions to keep, and the version numbers in the file names roll over.
This was very useful in MVS daily batch JCL streams, and I can see some uses for it in Unix shell scripts.
This article lays out a specification for GDGs on Linux. It doesn't supply any code, but suggests it would take about three days to write.
Considerations on GDGs on Linux - Elmar Klausmeier's Blog on Computers, Programming, and Mathematics
Data model, sketch of implementation of GDGs (Generation Data Groups) on Linux.
eklausmeier.goip.de
If I don't find someone who has already implemented this, I may have to do it myself.