Ed, your note implies the sliding glass door is on the second floor and the rotted header joist is below it. Inspite of whether I misunderstood your description I believe the rotted header joist needs to be replaced....you make it sound like it could be load bearing and if so, it definitely should be repaired. You aeed to keep the new replacement header joist from getting wet rot as well, so take of the root cause for that problem as well. I would consider using as the replacement wood ---treated wood, but you may have more fundamental moisture problems to correct as well. Good luck and let us know how your repair turned out.