Mainframe = IBM z/OS
so DB2 on mainframe = IBM DB2 for z/OS
How to get started in programming for DB2?
First, do you already have programming skills? Are you a programmer?
If not, first need to learn that. COBOL or Assembler or even Java.
Next, learn about relational database management system (RDBMS) theory.
This is so you can:
> learn SQL (the language of RDBMSes)
> un-learn what you know about "record at a time" programming. DB2 (and other RDBMSes) do not process one record at a time, but "set at a time."
> learn about using RDBMS built in constraints (primary keys, foreign keys, data contraints)
which is different than putting the controls in an application program.
> learn that Dr. Codd had a wonderul vision.
Next learn DB2 specfics, such as access path choices, BIND parms, even some of the tools and utilities available.
Then you are ready to begin programming.
Where does one learn this sort of thing? Junior college would be a good start (and I do mean start) because they will not give enough detail. They will teach you SQL and that is about it.
Do you have an RDBMS and a DBA where you work? Go talk with him. Ask to help or assist. you can learn by doing. And if he is any good, he will be able to teach you.
Another source is IBM's web sites.
DB2 version 9 manuals: http://www-01.ibm.com/support/docview.wss?rs=64&uid=swg27011659
also, IBM Developer Works for DB2 is a pretty resource for DB2 specific discussions.