A simple search or browse of the forum, or a simple read of the manual, would indicate that MASKs are only processed when data is output to a PRINTER file. So, from DISPLAY or PRINT statements. Not from PUT, or WRITE.
There is a file-exit here, kindly coded and tested by Chandan Inst, but you case is too simple even for that.
Redefine the field, twice. Firstly, first two bytes, secondly, first byte. Test first two bytes for zero, if true set to space. Else test first byte, if true set to space, else leave it alone.