Based on what I've seen it sounds correct that the key fob must be programmed by a dealer. There are a lot of places that sell them (one that I know of is
www.keylessride.com. The page for the '97 Jeep Grand Cherokee confirms that a dealer must program it:
http://www.keylessride.com/order/quo...&frid=2CA7BCEC
Another post on this forum says "you have to take these fobs to a dealership if it is a jeep after 96." (
http://www.automotiveforums.com/vbul...ht=program+key)
Other postings indicate that a locksmith might be able to do the job for less. I'm not sure what the secret is (it might be so they can confirm it's your vehicle), but I would be prepared to pay up to $75 or so to have it programmed (in case you can't do it on your own).
Let us know what you find out.