#1 set up an appointment with your vet to get him check for any kind of medical issues that could be causing this (my cat has a bladder infection so yeah it does happen) Set up a surgery date.
Is he having accidents or is he hiking his leg on certain things. He could be marking his territory. Neutering should stop most of this.
If it's not being potty trained you need to go back to the basics. Take him out after he eats, before playtime, after playtime, first thing when he gets up (slippon shoes at the door along with a leash and jacket) If he isn't crate trained, do that now too. He's not to be given free range of the house, keep him behind a baby gate in the laundry room or bathroom. I keep all my dogs tethered to me on a 4foot long leash until they are completley house broken.
Throughly clean up any mess he makes. Then douse the area with vinegar, that will stop him from peeing there again.