A key issue with mainframes is that the cohort of supporting programmers is dwindling. While normally this wouldn't be a problem in that a falling supply of programmers would be offset by an increasing amount of salary those causing a rising supply of programmers via the law of supply and demand, I'm not sure this is really happening for mainframes. 

While they still form critical infrastructure for many businesses, the simple fact is there isn't an adequate number of young programmers coming up along to keep the support population populated. 

Why is this? What makes mainframes unattractive to young programmers?

I'm an old programmer and I'm not interested in mainframes.  My reasons will probably be similar to the reasons given by young programmers, however, albeit without the ignorance of the technology so evident in many of these answers.

First, let's get the ignorance out of the way:


The various claims of inability to try out mainframes are false.  Hercules has been available since 1999—likely for longer than many of the people answering have been programming—and despite IBM's whinging over it the odds of it going away anytime soon are negligible (especially given that it's open source).  While it is, in fact, true that you cannot (legally) run the expensive software for it, there is plenty of software available you can run on it, including software that is actually still in fairly common use out there.
Again, contrary to public opinion, there is more to mainframes than COBOL, CICS and RPG2.  Indeed almost (but not quite) anything you can run on your PC running Linux you can run on a mainframe.  <irony>I'm not sure why.</irony>


So why is it that I've avoided mainframes for all my life after encountering them in school?  Well:


While it is true that you can use more than COBOL, CICS, RPG2, etc. in mainframes, odds are very high that if you work with them this is what you'll be relegated to doing.  Even worse, despite COBOL having been massively "modernized" in the past two decades or so (scare quotes because I still don't think it's a very modern language), most of the coding you'll do in COBOL will still be in old-style code because...
There's very little actual new development going on in mainframes.  If you land a job at IBM working for their mainframe R&D division you might get the chance to do new development (and in that case you might even really enjoy your job!).  In reality, though, face it: you won't be working there.  You'll be working in the back room of some financial institution or other maintaining 50-year old COBOL code written by someone who still thinks that 64KB is a whopping huge pile'o'RAM.  (This same guy will probably be your boss.)
While it is true that you can run Linux on mainframes, and thus have access to pretty much any programming language or environment you'd like, again, as with working for IBM's mainframe R&D, you're not going to get that job.  It's back to maintaining that 50-year old COBOL.
Corporate programming is very efficient at sucking the soul out of you (and remember, it's corporate programming you're going to be doing as a mainframe programmer unless you're VERY lucky).
It's a ghetto, and an ever-shrinking one.  (It's like MUMPS this way.)  If you get too steeped in mainframe lore you get further distanced from anything non-mainframe.  You can try to keep up, but you won't.  I know someone pointed out that mainframes have grown in sales while other server sectors shrunk a bit, but server programming is the minority these days.  Hell PCs in general are losing importance.  The world of programming is very wide and very diverse and having one minuscule portion of it grow in comparison to another minuscule portion is meaningless when compared to, say, the sudden, explosive growth of programming in something as trivial as the iPhone (which itself is a minority platform – by far).  No, start working in mainframes and you'll only have other mainframers to share your thoughts, your joys and your rages with – and they're a dying breed.  This leads to a negative feedback loop which makes the herd shrink even further and faster.


I'm sure there's lots of reasons that a mainframe programmer could give why the career is rewarding and full of joys and interesting challenges.  Indeed I've heard many of them from people trying to recruit me into the field.  In the end, however, I remained unconvinced, mostly because of the ghetto problem.  If I got in and found I didn't like it, how do I get out?
