Ten years ago, coders over 45 were much more vulnerable, because they tended to be more into older languages, like COBOL and C++, which were beginning to lose share in favor of Java and .NET.
But now, coders that age, tend to be fluent in Java and .NET, which are still going strong.
I am of this opinion... Every time Microsoft or other major software company releases a new technology, many developers quickly try to become professionally involved with it, which creates gaping holes in the support staff of organizations that still use the old technology. That spells opportunity for those who want to learn the old technology. The newercomers to the old technology may get more important assignments than they would, if they always chased the latest thing. Example: .NET created a shortage of COM expertise, and opportunity for developers to learn COM.
Java and .NET are the Cobol of today. And, as for C++, give Objective C a whirl first. Steve did. It's behind that X in OS X.
If you sincerely want to avoid Cobol, you should really should go back to 1958. If the parens put you off, consider JavaScript, Lua, Ruby, Python, Clojure, Scala.