My first question is why do you want/need to write a PTF exit program? What do you want to achieve with this?
1. I assume that it’s the same order that you list them in the APYPTF command – I don’t know this for sure.
2. This is also an assumption – PRE-REMOVE TEMP would be before you remove a TEMP applied PTF, PRE-APPLY TEMP, before temporarily applying a PTF and the same would then go for the perm PTFs.
3. This I don’t know.
4. This would depend upon your version and which hardware you have – so I think it would be reasonably specific to your machine.