Protecting Mainframe Files from Being Overwritten

When working on a mainframe, it is common practice to read a member from one dataset, edit it, then save it to a different dataset, avoiding the overwriting of the original member. Use the if-writing-to, or dataset update redirection entry in the configuration to avoid overwriting.

The entries take two parameters:

SourceConnect prevents the first dataset from being over-written by performing all write operations transparently to the second dataset. Subsequent reads check this alternate dataset first before checking the protected dataset. If the member is found in the alternate dataset, then it is read from there.

A typical example of this would be to read files from a production dataset, and save edited versions of the files to a testing dataset.