NicC wrote:Well, when I tried the command on the command line I got amessage saying I was unable to replace the member because it was in use i.e. I was viewing it. You can create a new member or replace the member, if it exists, in another PDS but you cannot replace the one you are actually viewing.
Oh yes, you can! View doesn't take any enqueues and a "repl .zf .zl mem" where "mem" is the member currently being viewed will work. Not bothered to try the OP's stuff, but it's obvious that something else must be wrong!