FORD F250 HD

I have a 97 ford f250 7.5l gas, at. when climbing a hill and i stomp on the gas pedal the tranny will upshift but has no power. at this time the check engine light comes on. i have not had the codes checked as of yet. any ideas