Book description
COBOL . . . Still standing tall.
Just like the evergreen, the COBOL programming language has remained vibrant and full of life year after year. Today, COBOL is running a large number of the world's business data applications, and it's likely to remain a viable language in the years ahead.
Now in its 11th Edition, Nancy Stern, Robert Stern, and James Ley's COBOL for the 21st Century continues to show how to design COBOL programs that are easy to read, debug, modify, and maintain. You'll learn to write interactive programs as well as batch programs with sophisticated file processing techniques, and become familiar with valuable information processing and systems concepts.
Features
Updated to reflect COBOL 2008, where appropriate.
A chapter on the Report Writer Module.
More end-of-chapter questions.
A running case study builds on what you have learned in each chapter.
Integrated coverage of interactive programming.
Covers information processing and systems concepts that will help you interact with users and systems analysts when designing programs.
Introduces programming tools such as pseudocode and hierarchy charts that make program logic more structured, modular, and top-down.
Presents useful techniques for maintaining and modifying older "legacy" programs.
Effective learning tools, including chapter outlines and objectives, debugging tips and exercises, critical-thinking questions, and programming assignments.
Links to COBOL Internet resources.
Companion Website (www.wiley.com/college/stern), featuring a syntax reference guide, data sets for all programming assignments, and all programs illustrated in the book.
Table of contents
- Copyright
- PREFACE
- ACKNOWLEDGMENTS
-
I. THE BASICS
-
1. An Introduction to Structured Program Design in COBOL
- 1.1. COMPUTER PROGRAMMING: AN OVERVIEW
- 1.2. THE APPLICATIONS PROGRAM DEVELOPMENT PROCESS
- 1.3. THE NATURE OF COBOL
- 1.4. A HISTORY OF COBOL AND THE ANS VERSIONS
- 1.5. TECHNIQUES FOR IMPROVING PROGRAM DESIGN
-
1.6. SAMPLE PROGREMS
- 1.6.1. Interactive vs. Batch Processing
- 1.6.2. An Overview of the Four Divisions
- 1.6.3. Definition of the Problem
- 1.6.4. A Brief Overview of Program Planning Tools
- 1.6.5. Our Definitions for Batch and Interactive Programs
- 1.6.6. Summary of COBOL as a Language for Both Batch and Interactive Processing
- 1.7. ENTERING AND RUNNING A COBOL PROGRAM ON YOUR COMPUTER
- 1.8. CHAPTER SUMMARY
- 1.9. KEY TERMS
- 1.10. CHAPTER SELF-TEST
- 1.11. REVIEW QUESTIONS
- 1.12. PROGRAMMING ASSIGNMENTS
-
2. The IDENTIFICATION and ENVIRONMENT DIVISIONs
-
2.1. BASIC STRUCTURE OF A COBOL PROGRAM
- 2.1.1. Coding a Source Program
- 2.1.2. Coding Rules
- 2.1.3. Types of COBOL Entries
- 2.2. CODING REQUIREMENTS OF THE IDENTIFICATION DIVISION
- 2.3. THE SECTIONS OF THE ENVIRONMENT DIVISION
- 2.4. ASSIGNING FILES TO DEVICES IN THE ENVIRONMENT DIVISION
- 2.5. CHAPTER SUMMARY
- 2.6. KEY TERMS
- 2.7. CHAPTER SELF-TEST
- 2.8. PRACTICE PROGRAM 1: INTERACTIVE PROCESSING
- 2.9. PRACTICE PROGRAM 2: BATCH PROCESSING
- 2.10. REVIEW QUESTIONS
- 2.11. PROGRAMMING ASSIGNMENTS
-
2.1. BASIC STRUCTURE OF A COBOL PROGRAM
-
3. The DATA DIVISION
- 3.1. SYSTEMS DESIGN CONSIDERATIONS
- 3.2. FORMING DATA-NAMES
-
3.3. THE FILE SECTION OF THE DATA DIVISION
- 3.3.1. An Overview
- 3.3.2. File Description Entries
- 3.3.3. SELF-TEST
- 3.3.4. Record Description Entries
- 3.3.5. SELF-TEST
- 3.4. TYPES OF DATA
- 3.5. THE WORKING-STORAGE SECTION OF THE DATA DIVISION
- 3.6. CHAPTER SUMMARY
- 3.7. KEY TERMS
- 3.8. CHAPTER SELF-TEST
- 3.9. PRACTICE PROGRAM 1: BATCH PROCESSING
- 3.10. PRACTICE PROGRAM 2: INTERACTIVE PROCESSING
- 3.11. REVIEW QUESTIONS
- 3.12. DEBUGGING EXERCISES
- 3.13. PROGRAMMING ASSIGNMENTS
-
4. Coding Complete COBOL Programs: The PROCEDURE DIVISION
- 4.1. A REVIEW OF THE FIRST THREE DIVISIONS
- 4.2. THE FORMAT OF THE PROCEDURE DIVISION
- 4.3. Statements Typically Coded in the Main Module of Batch Programs
- 4.4. STATEMENTS TYPICALLY CODED IN FULLY INTERACTIVE PROGRAMS
- 4.5. STATEMENTS TYPICALLY CODED FOR PROCESSING BATCH FILES
- 4.6. LOOKING AHEAD
- 4.7. PROCESS-AND-CREATE-OUTPUT MODULE FOR INTERACTIVE PROGRAMS
- 4.8. COMPARING BATCH AND INTERACTIVE PROGRAMS
- 4.9. REVIEW OF COMMENTS IN COBOL
- 4.10. Y2K-COMPLIANT DATE FIELDS
- 4.11. CHAPTER SUMMARY
- 4.12. KEY TERMS
- 4.13. CHAPTER SELF-TEST
- 4.14. PRACTICE PROGRAM
- 4.15. REVIEW QUESTIONS
- 4.16. DEBUGGING EXERCISES
- 4.17. PROGRAMMING ASSIGNMENTS
-
1. An Introduction to Structured Program Design in COBOL
-
II. DESIGNING STRUCTURED PROGRAMS
-
5. Designing and Debugging Batch and Interactive COBOL Programs
- 5.1. WHAT MAKES A WELL-DESIGNED PROGRAM?
- 5.2. DESIGNING PROGRAMS BEFORE CODING THEM
- 5.3. ILLUSTRATING LOGICAL CONTROL STRUCTURES USING PSEUDOCODE
- 5.4. HIERARCHY CHARTS FOR TOP-DOWN PROGRAMMING
- 5.5. NAMING MODULES OR PARAGRAPHS
- 5.6. MODULARIZING PROGRAMS
- 5.7. A REVIEW OF TWO CODING GUIDELINES
- 5.8. MAKING INTERACTIVE PROGRAMS MORE USER-FRIENDLY
- 5.9. HOW TO BEGIN CODING, COMPILING, AND DEBUGGING PROGRAMS
- 5.10. CHAPTER SUMMARY
- 5.11. KEY TERMS
- 5.12. CHAPTER SELF-TEST
- 5.13. PRACTICE PROGRAM 1
- 5.14. PRACTICE PROGRAM 2
- 5.15. REVIEW QUESTIONS
- 5.16. PROGRAMMING ASSIGNMENTS
-
6. Moving Data, Printing Information, and Displaying Output Interactively
- 6.1. INTRODUCTION
- 6.2. THE INSTRUCTION FORMATS OF THE MOVE STATEMENT
- 6.3. NUMERIC MOVE
- 6.4. NONNUMERIC OR ALPHANUMERIC MOVE
- 6.5. OTHER OPTIONS OF THE MOVE STATEMENT
-
6.6. PRODUCING PRINTED OUTPUT AND SCREEN DISPLAYS
- 6.6.1. Features of Printed Output and Screen Displays
-
6.6.2. The Editing Function
- 6.6.2.1. Printing or Displaying Decimal Points
- 6.6.2.2. Suppressing Leading Zeros
- 6.6.2.3. Printing or Displaying Dollar Signs and Commas
- 6.6.2.4. Printing or Displaying Asterisks (*) for Check Protection
- 6.6.2.5. Printing or Displaying Plus or Minus Signs
- 6.6.2.6. Printing or Displaying Debit and Credit Symbols for Accounting Applications
- 6.6.2.7. Printing or Displaying Spaces, Zeros, or Slashes as Separators within Fields
- 6.6.3. SELF-TEST
- 6.6.4. Editing Using Floating Strings
- 6.6.5. BLANK WHEN ZERO Option
- 6.6.6. Defining Print Records in WORKING-STORAGE
- 6.6.7. The WRITE . . . FROM Statement
- 6.6.8. The JUSTIFIED RIGHT Option
- 6.6.9. The ADVANCING Option for Spacing Printed Forms
- 6.6.10. SELF-TEST
- 6.6.11. Printing Page Numbers
- 6.6.12. Printing or Displaying the Date of the Run
- 6.6.13. Printing or Displaying Quotation Marks
- 6.7. DISPLAYING OUTPUT INTERACTIVELY USING SCREEN INPUT AND OUTPUT
- 6.8. DISCUSSION OF AN INTERACTIVE SOLUTION TO PROGRAMMING ASSIGNMENT 4
- 6.9. EXAMPLE: CALCULATION OF TUITION
- 6.10. ADDITIONAL SCREEN SECTION ENTRIES
- 6.11. CHAPTER SUMMARY
- 6.12. KEY TERMS
- 6.13. CHAPTER SELF-TEST
- 6.14. PRACTICE PROGRAM
- 6.15. REVIEW QUESTIONS
- 6.16. INTERPRETING INSTRUCTION FORMATS
- 6.17. DEBUGGING EXERCISES
- 6.18. PROGRAMMING ASSIGNMENTS
-
7. Computing in COBOL: The Arithmetic Verbs and Intrinsic Functions
- 7.1. THE BASIC ARITHMETIC VERBS
- 7.2. OPTIONS AVAILABLE WITH ARITHMETIC VERBS
- 7.3. THE COMPUTE STATEMENT
- 7.4. USE OF SIGNED NUMBERS IN ARITHMETIC OPERATIONS
- 7.5. INTRINSIC FUNCTIONS
- 7.6. CHAPTER SUMMARY
- 7.7. KEY TERMS
- 7.8. CHAPTER SELF-TEST
- 7.9. PRACTICE PROGRAM
- 7.10. REVIEW QUESTIONS
- 7.11. DEBUGGING EXERCISES
- 7.12. PROGRAMMING ASSIGNMENTS
-
8. Decision Making Using the IF and EVALUATE Statements
-
8.1. SELECTION USING A SIMPLE IF STATEMENT
- 8.1.1. A Review Of Logical Control Structures
- 8.1.2. Basic Conditional Statements
- 8.1.3. Planning Conditional Statements with Pseudocode
- 8.1.4. How Comparisons Are Performed
- 8.1.5. ASCII and EBCDIC Collating Sequences
- 8.1.6. Ending Conditional Sentences with a Period or an END-IF Scope Terminator
- 8.1.7. The CONTINUE Clause
- 8.1.8. SELF-TEST
- 8.2. SELECTION USING OTHER OPTIONS OF THE IF STATEMENT
- 8.3. USING IF STATEMENTS TO DETERMINE LEAP YEARS
- 8.4. CONDITION-NAMES
- 8.5. THE EVALUATE STATEMENT: USING THE CASE STRUCTURE AS AN ALTERNATIVE TO SELECTION
- 8.6. CHAPTER SUMMARY
- 8.7. KEY TERMS
- 8.8. CHAPTER SELF-TEST
- 8.9. PRACTICE PROGRAM
- 8.10. REVIEW QUESTIONS
- 8.11. DEBUGGING EXERCISES
- 8.12. PROGRAMMING ASSIGNMENTS
-
8.1. SELECTION USING A SIMPLE IF STATEMENT
-
9. Iteration: Beyond the Basic PERFORM
- 9.1. THE SIMPLE PERFORM REVIEWED
- 9.2. ITERATION USING OTHER TYPES OF PERFORMS
- 9.3. USING NESTED PERFORM VARYING STATEMENTS
- 9.4. THE PERFORM WITH TEST AFTER OPTION
- 9.5. CHAPTER SUMMARY
- 9.6. KEY TERMS
- 9.7. CHAPTER SELF-TEST
- 9.8. PRACTICE PROGRAM
- 9.9. REVIEW QUESTIONS
- 9.10. DEBUGGING EXERCISES
- 9.11. PROGRAMMING ASSIGNMENTS
-
5. Designing and Debugging Batch and Interactive COBOL Programs
-
III. WRITING HIGH-LEVEL COBOL PROGRAMS
-
10. Control Break Processing
- 10.1. AN INTRODUCTION TO CONTROL BREAK PROCESSING
- 10.2. PROGRAM REQUIREMENTS FOR CONTROL BREAK PROCESSING
- 10.3. MULTIPLE-LEVEL CONTROL BREAKS
- 10.4. CHAPTER SUMMARY
- 10.5. KEY TERMS
- 10.6. CHAPTER SELF-TEST
- 10.7. PRACTICE PROGRAM 1
- 10.8. PRACTICE PROGRAM 2
- 10.9. REVIEW QUESTIONS
- 10.10. DEBUGGING EXERCISES
- 10.11. PROGRAMMING ASSIGNMENTS
-
11. Data Validation
- 11.1. AVOIDING LOGIC ERRORS BY VALIDATING INPUT
-
11.2. WHAT TO DO IF INPUT ERRORS OCCUR
- 11.2.1. Print an Error Record Containing the Key Field, the Contents Of the Erroneous Field, and an Error Message
- 11.2.2. Stop the Run
- 11.2.3. Partially Process Or Bypass Erroneous Records
- 11.2.4. Stop the Run if the Number Of Errors Exceeds a Predetermined Limit
- 11.2.5. Use Switches
- 11.2.6. Print Totals
- 11.3. GLOBAL CONSIDERATIONS IN COBOL
- 11.4. WHEN DATA SHOULD BE VALIDATED
- 11.5. UNDERSTANDING PROGRAM INTERRUPTS
-
11.6. OTHER METHODS FOR IMPROVING PROGRAM PERFORMANCE
- 11.6.1. Verifying File-Names With ACCEPT and DISPLAY Statements When Using a PC Compiler for Interactive Processing
- 11.6.2. The READ ... INTO Statement in Place of Using READ and MOVE Statements
- 11.6.3. Clearing Fields Using the INITIALIZE Statement
- 11.6.4. Improving Program Efficiency with the USAGE Clause
- 11.7. CHAPTER SUMMARY
- 11.8. KEY TERMS
- 11.9. CHAPTER SELF-TEST
- 11.10. PRACTICE PROGRAM
- 11.11. REVIEW QUESTIONS
- 11.12. DEBUGGING EXERCISES
- 11.13. PROGRAMMING ASSIGNMENTS
-
12. Array Processing and Table Handling
- 12.1. AN INTRODUCTION TO SINGLE-LEVEL OCCURS CLAUSES
- 12.2. PROCESSING DATA STORED IN AN ARRAY
- 12.3. USING AN OCCURS CLAUSE FOR TABLE HANDLING
-
12.4. USE OF THE SEARCH STATEMENT FOR TABLE AND ARRAY PROCESSING
- 12.4.1. Format of the SEARCH Statement
- 12.4.2. The INDEXED BY Clause and the SEARCH Statement
- 12.4.3. Modifying the Contents of an Index
- 12.4.4. Searching a Table–Foreign Exchange Example
- 12.4.5. Using Two WHEN Clauses for an Early Exit from a SEARCH
- 12.4.6. Searching for Multiple Matches
- 12.4.7. Internal vs External Tables
- 12.5. LOOKING UP TABLE DATA FOR ACCUMULATING TOTALS
- 12.6. THE SEARCH ... VARYING OPTION FOR PROCESSING PARALLEL TABLES
- 12.7. THE SEARCH ALL STATEMENT
- 12.8. MULTIPLE-LEVEL OCCURS CLAUSE
- 12.9. CHAPTER SUMMARY
- 12.10. KEY TERMS
- 12.11. CHAPTER SELF-TEST
- 12.12. PRACTICE PROGRAM
- 12.13. REVIEW QUESTIONS
- 12.14. DEBUGGING EXERCISES
- 12.15. PROGRAMMING ASSIGNMENTS
-
10. Control Break Processing
-
IV. FILE MAINTENANCE
-
13. Sequential File Processing
-
13.1. SYSTEMS OVERVIEW OF SEQUENTIAL FILE PROCESSING
- 13.1.1. Master Files
-
13.1.2. Typical Master File Procedures: A Systems Overview
- 13.1.2.1. Designing a Master File for Sequential Processing in Batch Mode
- 13.1.2.2. Creating a Master File for Sequential Processing in Batch Mode
- 13.1.2.3. Creating a Transaction File for Sequential Processing in Batch Mode
- 13.1.2.4. Updating a Master File for Sequential Processing in Batch Mode
- 13.1.2.5. Reporting from a Master File for Sequential Processing in Batch Mode
- 13.1.2.6. Creating Original Master and Transaction Files for New Systems
- 13.2. SEQUENTIAL FILE UPDATING—CREATING A NEW MASTER FILE USING A PREVIOUS MASTER FILE AND A TRANSACTION FILE
- 13.3. VALIDITY CHECKING IN UPDATE PROCEDURES
- 13.4. UPDATE PROCEDURES WITH MULTIPLE TRANSACTION RECORDS FOR EACH MASTER RECORD
- 13.5. THE BALANCED LINE ALGORITHM FOR SEQUENTIAL FILE UPDATING
- 13.6. SEQUENTIAL FILE UPDATING—REWRITING RECORDS ON A DISK
- 13.7. FILE MANAGEMENT TIPS
- 13.8. MATCHING FILES FOR CHECKING PURPOSES
- 13.9. INTERACTIVE UPDATING OF A SEQUENTIAL FILE
- 13.10. CHAPTER SUMMARY
- 13.11. KEY TERMS
- 13.12. CHAPTER SELF-TEST
- 13.13. PRACTICE PROGRAM
- 13.14. REVIEW QUESTIONS
- 13.15. DEBUGGING EXERCISES
- 13.16. PROGRAMMING ASSIGNMENTS
-
13.1. SYSTEMS OVERVIEW OF SEQUENTIAL FILE PROCESSING
- 14. Sorting and Merging
-
15. Indexed and Relative File Processing
- 15.1. SYSTEMS CONSIDERATIONS FOR ORGANIZING DISK FILES
- 15.2. FEATURES OF MAGNETIC DISKS AND DISK DRIVES
-
15.3. PROCESSING INDEXED DISK FILES
- 15.3.1. Creating an Indexed File
- 15.3.2. Updating an Indexed File Randomly
- 15.3.3. Updating an Indexed File with Multiple Transaction Records for Each Master Record
- 15.3.4. Accessing or Reading from an Indexed File for Reporting Purposes
- 15.3.5. SELF-TEST
-
15.4. ADDITIONAL OPTIONS FOR INDEXED FILE PROCESSING
- 15.4.1. Using ALTERNATE RECORD KEYS
- 15.4.2. The START Statement
- 15.4.3. Accessing an Indexed File Dynamically
- 15.4.4. SELF-TEST
- 15.4.5. A Review of INVALID KEY Clauses
- 15.4.6. ALTERNATE RECORD KEYS Reduce the Need for Multiple Copies of a File
- 15.4.7. The FILE STATUS Clause
- 15.4.8. Exception Handling with the USE Statement
- 15.4.9. SELF-TEST
- 15.5. USING AN INDEXED DISK FILE AS AN EXTERNAL TABLE
- 15.6. PROCESSING RELATIVE DISK FILES
- 15.7. CONVERTING A KEY FIELD TO A RELATIVE KEY
- 15.8. CHAPTER SUMMARY
- 15.9. KEY TERMS
- 15.10. CHAPTER SELF-TEST
- 15.11. PRACTICE PROGRAM
- 15.12. REVIEW QUESTIONS
- 15.13. DEBUGGING EXERCISES
- 15.14. PROGRAMMING ASSIGNMENTS
-
13. Sequential File Processing
-
V. ADVANCED TOPICS
- 16. Improving Program Productivity Using The COPY, CALL, and Other Statements
-
17. The Report Writer Module
- 17.1. INTRODUCTION
- 17.2. THE BENEFITS OF THE REPORT WRITER MODULE
- 17.3. THE REPORT SECTION IN THE DATA DIVISION
- 17.4. PROCEDURE DIVISION STATEMENTS
- 17.5. CHAPTER SUMMARY
- 17.6. KEY TERMS
- 17.7. CHAPTER SELF-TEST
- 17.8. PRACTICE PROGRAM
- 17.9. REVIEW QUESTIONS
- 17.10. DEBUGGING EXERCISES
- 17.11. PROGRAMMING ASSIGNMENTS
- VI. APPENDIXES
Product information
- Title: COBOL for the 21st Century
- Author(s):
- Release date: August 2005
- Publisher(s): Wiley
- ISBN: 9780471722618
You might also like
book
Beginning COBOL for Programmers
Beginning COBOL for Programmers is a comprehensive, sophisticated tutorial and modular skills reference on the COBOL …
book
A Common-Sense Guide to Data Structures and Algorithms, Second Edition, 2nd Edition
Algorithms and data structures are much more than abstract concepts. Mastering them enables you to write …
book
Algorithms, 4th Edition
This fourth edition of Robert Sedgewick and Kevin Wayne’s Algorithms is the leading textbook on algorithms …
book
C Programming Language, 2nd Edition
This book is meant to help the reader learn how to program in C. It is …