To do that requires a bootloader preloaded in the PIC, so you need a seperate programmer to start with.
Also check the datasheet, and see if the 872 has bootloader capability?, the 876 and 877 do, I'm not sure about the 872 (I've never had occasion to look).