Bill, I strongly suspect you have a cold solder joint on the sustain pedal input jack - not unusual and very easy to repair. However, if you have not been inside a keyboard, I suggest taking it to an authorized factory repair center.
Gary
_________________________
PSR-S950, TC Helicon Harmony-M, Digitech VR, Samson Q7, Sennheiser E855, Custom Console, and lots of other silly stuff!
K+E=W (Knowledge Plus Experience = Wisdom.)