how can i get my four year old male non neutered yorkie to s

  we also have a 11 year old male pomeranian, again, non neutered, dog. they are let out constantly and when we are not home they are pinned up in a fairly large back porch room. however, no matter how much we let them out , they continue to urinate in the house. often when we are not looking or are in another part of the house. or in the middle of the night.
A very difficult task. Non neutered male dogs feel the need to mark their territory. I'm sure plenty of people will respond about the need to neuter the dogs so I won't take that path. This can only be corrected by applying time and dedication that most people don't have or want to give. It requires first and foremost a level of cleaning. Get a blacklight (prepare to be grossed out) and in the dark of night walk around the house and you will see everywhere the dog has peed (organic matter will glow green). mark it with tape or a sticky note. Use an enzymatic cleaner. The secret to enzymatic cleaners is that the surface needs to stay damp so if there is pee on the corner of a sofa, saturate it and the floor and leave it to dry naturally. The enzymes will eat up the organic matter. This is the only way to get rid of the odor (that dogs can smell. Plenty of products will remove what people can smell). Once done, you have to become completely vigilant NEVER allowing the dog to mark without you being there. This can entail kenneling when you're away and tethering them when you are. You MUST be able to catch them in the act and correct. This will also only work if your dog sees you as the true leader and your correction must be appropriate to that role. With consistency, if EVERY time they hike their leg the are ALWAYS corrected, they WILL stop hiking their leg. But if there are ever holes in that where the dog gets away with it, you'll only wind up teaching the dog to mark outside of your presence. Very few people have the gumption to pull this kind of training off and revert to "belly bands" which your wrap around the dogs waist so when they try to mark the end up peeing in the pad. See http://www.bellybands.net/
by neutering them, smart one. & yes, neutering has everything to do w/it. non neutered dogs mark "their" territory by peeing everywhere and they are declaring their dominance. even if you house break them (which you already should have since theyre frickin 11 yrs old ) they will still scentmark places. neuter your dogs! dont add to the already HUGE population of homeless dogs.
If you were highly concerned about this, you shouldn't have went for a male dog.
neutering or lack of has nothing to do with it you housebreak them just like any other dog. Put them on a leash and take them outside until they do their thing