You can still use the "change date" columns, if you still use source physical files, to store something like this:
aaaddd
Where "aaa" is a 3-digit version number when this line was "added" and "ddd" is the version number when this line was "deleted." You would initialize all lines to start out with "000999" in that field. If 999 revisions is "not enough" for you, you could even store those as hexadecimal, giving 4096 possible "versions" or as a pair of 3-byte binary numbers, allowing for up to 16 million possible "versions." :-o
Then a very simple preprocessor can use an SQL select statement to select only those statements for the version you wish to view or compile.
Of course, you would probably then want to write a special "editor" or front-end or exits to edit the source, because it could be very confusing to edit and have to constantly refer to those columns.
In fact, you could even run that same preprocessor to select the current version, then edit that with SEU, say in QTEMP, and when you save the changes, use the IBM supplied CMPPFM command to compare the currently "latest" version with the changes you just saved, and using the *OUTFILE capability of CMPPFM, we could write a program to generate the correct commands to insert or update any lines in the original source with the correct "level stamps" in there.
On Wednesday, October 2, 2019, 9:26:46 AM EDT, John Yeung <gallium.arsenide@xxxxxxxxx> wrote:
Full free pretty much requires a CMS like Git. And in fact, that's my
biggest kick against it. A LOT of people hate mod marks, but I'm not
one of them. I like to be able to bring up source code and be able to
read through the historical changes in a particular routine.
As with everything, there are trade-offs. In a way, it's nice to see
*some* changes. But it can easily become a mess when people are afraid
to get rid of code.
I like to leave a wordy comment explaining changes and decisions and
rationales, and then have the code itself be clean and free from
baggage. I don't mind if these comments are many lines long. I'd
rather read a few paragraphs of clearly expressed thoughts than a
jumble of code with half a dozen sets of mod marks and lots of
commented-out code interspersed with live code.
John Y.
As an Amazon Associate we earn from qualifying purchases.