Delete a member in a PDS, when someone is using it

//DELMEMB EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//PDS DD DSN=libraryname,DISP=SHR
//SYSIN DD *
ALLOC DDN(INFILE) SHR REUSE DSN('libraryname ')
DELETE libraryname(membername) FILE(PDS)