The lock mechanism broke in my exterior door knob. I am probably going to have to buy a new one. Can i buy a new door knob and program it to use my existing key so I don't have to get new keys?
Most brands of locks can be re-keyed, but it usually requires specialized techniques and sometimes tools. Many retailers will do it in-house free or for a small fee. Otherwise, any locksmith* should be able to help you out.
Be aware that keys have brand-specific cross-sectional shapes, so be sure to buy a new lockset of the same brand (or compatible with) the old one.
* I'll concede that locksmiths may have a slightly higher than average rate of crookery among them, but it goes without saying that any company performing service on or involving your home should be vetted properly. Any implies any reputable locksmith.
At least one company makes self-rekeying door locks. They are a hunky vendor, and their stuff is all about features not longevity or quality, but it works for awhile.
Find a locksmith that has a walk-in retail store. Walk in, and tell them you want new lock sets to match this key. They will make you absolutely anything. And it will be a cut above; ranging from “acceptable” to “ indestructible” depending on how much you want to pay. Prices will be sane, but more than “grab a kwikset off the shelf at HD”.
Out of this world option
Call the same established locksmith (do not use web search, or you will get a lead generator or crook) . Have them come to your site with their truck.
Many locksmiths will only do business this way. They are the wrong ones for you, unless you want this.
If your current locks are Kwikset brand, you're in luck -- they make a line of products called SmartKey, which allows you to rekey them yourself at home.
If it's a different brand, then follow isherwood's advice.
When I moved into a house that was previously owned by someone else, I wanted to have all the exterior locks re-keyed, have some upside-down cylinders turned right-side up, and make some doorknob locks match their deadbolt locks so I wouldn't need two keys for one door. I was looking at over three hundred dollars for a reputable locksmith to do all the work. (It's a country house with many doors.)
Instead, I purchased two re-keying kits online, one Kwikset and one Schlage for about $45 total. The kits included special tools that make the process easy. There are numerous instructional videos online that show how it's done.
Since that time, I've had to replace some worn out locks with new ones, and I simply re-key the new locks myself. Easy peasy, and no locksmith required.
A lot of big box stores typically have one person trained in re-keying locks (and only one, as in if they're not there when you come, you're out of luck until they come back). If you ask them, they will typically re-key anything the big box sells. It's less prevalent in the era of the Kwikset DIY re-key, but they're still out there.