Save the changes in VIEW mode

It must have often happened with you that  you were making changes to a memberand once you try to save it, MVS prompts you that you are in the VIEW modeand you can’t save the changes.Personally speaking this has happened with me couple of times and it really was verydisappointing to lose so many changes.But Yeah MVS is not that cruel, this is a warning so that you dont un knowingly makechanges to a dataset.There is a way out by which you can still save your changes.

Step 1:

In the command line give the following command    REPLACE .ZF .ZL        Where .ZF is a standard name for label for first line          .ZL is a standard name for label for last line             This means I want to cover everything between these two lines,    i.e whole stuff.        

Step 2:

In the “Edit/View Replace” Dialog give the dataset name.Note if you want to save the changes to the original datasetthen give its name or else you can give another name to save

it to a different dataset.