This is the one DB2 book that focuses on what COBOL programmers…not DBAs…need to know. As a result, it works well for instructors who are training students for DB2 programming jobs in their region. And, yes, it will outperform any training materials that are available from IBM.
Although this edition of the book was published in 1999, trainers at mainframe shops tell us that DB2 programming is still being done the way it’s presented in this book. One reason for this is 70% or more of the programming in a mainframe shop is maintenance programming on “legacy” applications. Another reason is that IBM has always prided itself on the upward-compatibility of its software, so the code that worked in 1999 still works today.
Incidentally, this is the first mainframe book we developed with our “paired pages” format. It is also one of the last books that we published before we went to blue covers with Murach’s as part of the title. But if you’ve ever adopted any of our Murach’s books, you can count on this book to deliver the same level of practical, example-packed information…even though the cover is different!
"I just wanted to say that DB2 for the COBOL Programmer, Part 1 is one of the most helpful programming books I have ever bought. I was starting a new job, and although I had plenty of COBOL experience, I had no DB2 experience. With this book, I was ready-to-go in 2 days."
DB2 is the primary database management system (DBMS) for IBM mainframe computers that run under the z/OS operating system and its predecessors. Although you can use several different methods to work with DB2 databases, most DB2 work is done through COBOL programs. The goal of this book is to show how to develop and maintain those COBOL/DB2 programs.
Specifically, this book shows how to use Structured Query Language (SQL) within a COBOL program to retrieve and update data stored in DB2 databases. To get your students started right:
When your students complete this section, they’ll be able to write production COBOL programs.
In section 2, each of the seven chapters expands upon the basic skills so your students can process DB2 data with more expertise. For instance,
In this section, each chapter is written as an independent unit, so you can assign these chapters in whatever sequence you prefer.
In section 3, your students learn the skills for binding, precompiling, compiling, link editing, and testing COBOL programs:
You can assign the chapters in this section any time after your students complete chapter 1.
If you offer mainframe programming courses in your curriculum, this book can be used for a complete course in DB2 programming. It can also be used as an information-only supplement to a COBOL programming course to show how DB2 is integrated with COBOL in a COBOL/DB2 program on a mainframe.
Since COBOL/DB2 applications run on IBM mainframes, this book is best used in curricula that provide free access to an IBM mainframe. Then, your students can compile and test their exercises and projects on that mainframe.
If your school doesn’t have access to an IBM mainframe, you can use this book to teach DB2 programming as an information-only course. Then, you won’t need a computer lab at all. This can work in conjunction with a COBOL course when you just want your students to know what’s different about DB2 programming and where it fits in the IT job market.
To view the table of contents for this book in a PDF, just click on the link below:
If you aren’t already familiar with the supporting courseware that we provide for a book, please go to About our Courseware. As you will see, our courseware consists of the end-of-chapter activities in the book, the files in the student download at our retail site, and the instructor’s materials. These components provide everything that other publishers provide in a way that delivers better results.
If you are familiar with our courseware, here’s a quick summary of the courseware for this book. For a detailed description in PDF format, please read the Instructor’s Summary.
On this page, we’ll be posting answers to the questions that come up most often about this book. So if you have any questions that you haven’t found answered here at our site, please e-mail us. Thanks!
DB2 for the COBOL Programmer, Part 1 (2nd Ed.) is currently in its second printing. Since that printing, errors were discovered in the programs in chapters 2 and 3. Those errors are described below.
Below the copyright notation on the back of the title page (page ii), you'll find a series of numbers like this:
10 9 8 7 6 5 4 3 2
The number on the right of this sequence tells which printing your book is. In this example, it's in the second printing.
If an SQLCODE other than 0 or 100 is encountered when a row is fetched in module 170 of the sales inquiry program, the current code in that module does not end the PERFORM 160 loop in module 140 that gets invoice information UNTIL END-OF-INVOICES. You can correct this problem using one of two techniques. First, you can add another condition to the PERFORM 160 statement so it looks like this:
OR NOT VALID-CURSOR
You can also correct this problem by modifying the error checking code in module 170 like this:
IF SQLCODE NOT = 0
MOVE 'Y' TO END-OF-INVOICES-SW
IF SQLCODE NOT = 100
MOVE 'N' TO VALID-CURSOR-SW
If you make this change, you can also remove the IF VALID-CURSOR statement from module 160, since the END-OF-INVOICES condition in that module will always be true if the cursor is not valid.
In module 000 of the enhanced update program, the SQLCODE is displayed if an error occurs during the processing of a transaction and the unit of work must be rolled back. The intent was to display the SQLCODE from the SQL statement that caused the error. But because the ROLLBACK statement in module 200 is executed before the SQLCODE is displayed, the SQLCODE from the ROLLBACK statement is displayed instead. The easiest way to correct this problem is to move the statement that displays the SQLCODE in module 000 before the PERFORM statement for module 200.
If you find any other errors, please email us so we can correct them in the next printing of the book. Thank you!
Weekdays, 8 to 4 Pacific Time
This is our site for college instructors. To buy Murach books, please visit our retail site.