Why no shifting in 1997 gmc t6 transmission when check engine light is on?

The transmission codes and functions are often controlled by the ecm, engine control module computer. The ecm stores the fault codes from the engine and transmission. It is telling you that you have a transmission problem, the vehicle must have the ecm scanned by a certified technician, to properly diagnose the problem.