When the O/D Light flashes, it indicates an error has been detected in the transmission control system and the harsh and erratic shifting is an indication of that.
Some codes are not stored and the only way is to plug in the scan tool without turning engine off when the O/D lighst starts to flash to read the code.
Since problem is intermittent, it could be a loose or contminated connector and this is going to get worse in time to come. Check the transmission wireharness connector pack for presensce of water and signs of contaminations to the terminals.
Monday, October 8th, 2012 AT 4:14 AM