first you must catch him in the act. otherwise you shouldnt punish him. when you do catch him you should give him a harsh NO and then take him where you want him to go. Its best to take him to this place after he eats a meal and wait until he does go and associate a command such as go weees and then prise him this happens