Yeah, this happened to me too. Bought the 98 used (from a non-Pontiac dealer), and it required a new battery before I took delivery. When I then took possession, the radio no longer worked. I didn't have the code. Called a Pontiac dealer. He told me a sequence of things to do which then gave me some sorta readout on the radio dial. I then told the dealer what the readout said, and he gave me the code from a "decoder" book that every dealer has. I used that code to re-established radio usability, then changed the code to something I could easily remember (and wrote it into the owner's manual) in accordance with the directions in the owner's manual. First step, call a Pontiac dealer.
Regards, Gary in Sandy Eggo
PS - once you've got the radio working again, you might want to consider turning off the code thing. We DO have that option. I just now thought about that. I think I'll just turn mine off. Who the heck is going to steal a stock radio out of a car, anyway?