Beginning COBOL for Programmers
Beginning COBOL for Programmers is a comprehensive, sophisticated tutorial and modular skills reference on the COBOL programming language for established programmers. This book is for you if you are a developer who would like to—or must—add COBOL to your repertoire. Perhaps you recognize the opportunities presented by the current COBOL skills crisis, or are working in a mission critical enterprise which retains legacy COBOL applications. Whatever your situation, Beginning COBOL for Programmers meets your needs as an established programmer moving to COBOL.
Beginning COBOL for Programmers includes comprehensive coverage of ANS 85 COBOL features and techniques, including control structures, condition names, sequential and direct access files, data redefinition, string handling, decimal arithmetic, subprograms, and the report writer. The final chapter includes a substantial introduction to object-oriented COBOL.
Benefiting from over one hundred example programs, you’ll receive an extensive introduction to the core and advanced features of the COBOL language and will learn to apply these through comprehensive and varied exercises. If you've inherited some legacy COBOL, you’ll be able to grasp the COBOL idioms, understand the constructs, and recognize what's happening in the code you’re working with.
Today’s enterprise application developers will find that COBOL skills open new—or old—doors, and this extensive COBOL reference is the book to help you acquire and develop your COBOL skills.
result in GrossPay. SUBTRACT Tax FROM GrossPay GIVING NetPay * Subtracts the value in Tax from the value in GrossPay and puts the result in NetPay. DIVIDE Total BY Members GIVING MemberAverage ROUNDED * Divides the value in Total by the value in Members and puts * the rounded result in MemberAverage. DIVIDE Members INTO Total GIVING MemberAverage * Divides the value in Members into the value in Total and puts the result in MemberAverage. MULTIPLY 10 BY Magnitude * Multiplies 10 by the value in
functionality such as payroll, stock control, and accounting that today would be done by a COTS system. Replacing such a legacy system with a standard COTS package might seem like an attractive option, and in some cases it might be successful; but in many legacy systems, so many proprietary extensions have been added to the standard functionality that replacement is no longer a viable option. Attempting to replace such a legacy system with a COTS package will fail—either completely, causing the
to read the next item. In this pattern, a loop processes the data in the stream. Outside the loop, you have a read to get the first item in the stream or to discover that the stream is empty. Inside the loop, you have statements to process the stream item and get the next item in the stream. Why do you have this strange arrangement? The chief reason is that this arrangement allows you to place the read at the end of the loop body so that as soon as the end of the file is detected, the loop can be
be done; and if a ShopDetails record was read, the summary line would be produced and displayed. This is not a terrible solution for a problem of this size; but when you get to control breaks—a type of problem of which this is a near relation—this type of solution quickly becomes complicated. The solution adopted in Listing 8-1 involves examining the structure of the records in the ShopReceiptsFile and producing a solution that reflects that structure. What do I mean by the structure of the file?
in the number With three blanks inserted in the number 00/014/584.95 00014000584.95 00014 584.95 PROGRAMMING EXERCISE 1 It is exercise time again. Now, where did you put that 2B pencil? Write a program to satisfy the following specification. University Entrants Summary Report A program is required that will process the first-year-student entrants file (Entrants.dat) to produce a summary that shows the number of first-year students in each course. The summary should be displayed on the screen