Sorry, but the communication protocols that T-Mobile and Sprint use are totally different and NOT compatible. The Sprint Sanyo Katana can NOT be used on the T-Mobile network. It would be like trying to run Apple OS X on a Windows computer - just doesn't work.
No matter which codes you get to "unlock" the Katana, it's electronics are not capable of working with the T-Mobile network.
sorry but Tom is right, you are SOL.
Sprint phones (like your Katana) use a type of cellular system called CDMA. It also has specific Sprint settings, so while it might be possible to get the thing going w/ Verizon (who also uses CDMA) it would be difficult. You would also need the phone's MSL (Master Subsidy Lock) code.
However Tmobile uses GSM. GSM is 100% incompatible with CDMA, so there is no way the Katana will be able to connect to Tmo.
If you want to buy a phone for Tmobile, you will need either a phone that is branded as Tmobile USA, or an unlocked GSM phone. There are many companies that sell unlocked phones, most of the manufacturers (mot, nokia, etc) will happily sell you one. Expect to pay (new) more than if you bought from the carrier, because it's not subsidized by the carrier. Unlocked phones also come without the usual carrier locks, so you can load any program and/or use any SIM card from any network in it (so if you go to Europe, you can just pop in a European SIM)
Sorry to be the bearer of bad news.