There is no command for this on Commodore floppy drives like 1541/71/81. Maybe on some third-party drives, but I don't know of any. On Commodore drives you have to read in the sector from the directory, modify bit 6 of the "file type" byte, then write the sector back onto the disk.
As I recall, $82 = normal PRG, $C2 = locked PRG, $02 = splat PRG. Of course there are other values, but this should be enough to get you started.