| |
| |
| |
Introduction | |
| |
| |
| |
From Coding Form to Computer | |
| |
| |
From Coding Form to Computer | |
| |
| |
The COBOL Coding Form | |
| |
| |
Use of an Editor | |
| |
| |
The Compile, Link, and Execute Sequence | |
| |
| |
Learning by Doing | |
| |
| |
Errors in Entering the Program | |
| |
| |
Errors in Operating System Commands | |
| |
| |
Errors in Compilation | |
| |
| |
Errors in Execution | |
| |
| |
Errors in Data Input | |
| |
| |
Evolution of COBOL | |
| |
| |
There's Always a Reason | |
| |
| |
| |
A Methodology for Program Development | |
| |
| |
The Tuition Billing Problem | |
| |
| |
Structured Design | |
| |
| |
Evaluating the Hierarchy Chart | |
| |
| |
Completeness | |
| |
| |
Functionality | |
| |
| |
Span of Control | |
| |
| |
Structured Programming | |
| |
| |
| |
The Identification, Environment, and Data Divisions | |
| |
| |
COBOL Notation | |
| |
| |
Identification Division | |
| |
| |
Environment Division | |
| |
| |
Configuration Section | |
| |
| |
Input-Output Section | |
| |
| |
Data Division | |
| |
| |
File Section | |
| |
| |
Working-Storage Section | |
| |
| |
The Tuition Billing Program | |
| |
| |
Programming Specifications | |
| |
| |
COBOL Entries | |
| |
| |
Limitations of COBOL-74 | |
| |
| |
| |
The Procedure Division | |
| |
| |
Open | |
| |
| |
Close | |
| |
| |
Read | |
| |
| |
Placement of the READ Statement | |
| |
| |
Write | |
| |
| |
Stop Run | |
| |
| |
Move | |
| |
| |
Restrictions on the Move Statement | |
| |
| |
Alphanumeric Field to Alphanumeric Field | |
| |
| |
Numeric Field to Numeric Field | |
| |
| |
Group Moves | |
| |
| |
Perform | |
| |
| |
IF | |
| |
| |
The ELSE Clause | |
| |
| |
Indentation | |
| |
| |
EVALUATE | |
| |
| |
Arithmetic Statements | |
| |
| |
The ROUNDED Clause | |
| |
| |
The SIZE ERROR Clause | |
| |
| |
Compute | |
| |
| |
Add | |
| |
| |
Subtract | |
| |
| |
Multiply | |
| |
| |
Divide | |
| |
| |
Programming Tip: Use the COMPUTE Statement | |
| |
| |
Assumed Decimal Point | |
| |
| |
The Tuition Billing Program | |
| |
| |
Test Data | |
| |
| |
Hierarchy Chart | |
| |
| |
COBOL Program Skeleton | |
| |
| |
Limitations of COBOL-74 | |
| |
| |
| |
Debugging | |
| |
| |
Errors in Compilation | |
| |
| |
Common Compilation Errors | |
| |
| |
Errors in Execution | |
| |
| |
File Status Codes | |
| |
| |
Another Run Time Error | |
| |
| |
Logic Errors | |
| |
| |
Tips for Debugging | |
| |
| |
DISPLAY Statement | |
| |
| |
The Structured Walkthrough | |
| |
| |
| |
Editing and Coding Standards | |
| |
| |
Editing | |
| |
| |
The Decimal Point | |
| |
| |
Zero Suppression | |
| |
| |
Dollar Signs | |
| |
| |
Comma | |
| |
| |
Asterisks for Check Protection | |
| |
| |
Insertion Characters | |
| |
| |
Synopsis | |
| |
| |
Signed Numbers | |
| |
| |
CR and DB | |
| |
| |
Plus and Minus Signs | |
| |
| |
Blank When Zero Clause | |
| |
| |
The Tuition Billing Program Revisited | |
| |
| |
Coding Standards | |
| |
| |
Data Division | |
| |
| |
Programming Tip: Avoid Literals | |
| |
| |
Procedure Division | |
| |
| |
Programming Tip: Use Scope Terminators | |
| |
| |
Both Divisions | |
| |
| |
A Well-Written Program | |
| |
| |
| |
Data Validation | |
| |
| |
System Concepts: Data Validation | |
| |
| |
The IF Statement | |
| |
| |
Relational Condition | |
| |
| |
Class Test | |
| |
| |
Sign Test | |
| |
| |
Condition-Name Test (88-Level Entries) | |
| |
| |
Compound Test | |
| |
| |
Hierarchy of Operations | |
| |
| |
Implied Conditions | |
| |
| |
Nested Ifs | |
| |
| |
Next Sentence | |
| |
| |
Accept Statement | |
| |
| |
Calculations Involving Dates | |
| |
| |
The Stand-Alone Edit Program | |
| |
| |
Programming Specifications | |
| |
| |
Error Messages | |
| |
| |
Pseudocode | |
| |
| |
Hierarchy Chart | |
| |
| |
The Completed Program | |
| |
| |
Limitations of COBOL-74 | |
| |
| |
| |
More About the Procedure Division | |
| |
| |
Perform | |
| |
| |
Test Before/Test After | |
| |
| |
In-line Perform | |
| |
| |
Performing Sections | |
| |
| |
Perform Thru | |
| |
| |
Programming Tip: Perform Paragraphs, Not Sections | |
| |
| |
Read | |
| |
| |
False-Condition Branch | |
| |
| |
Read Into | |
| |
| |
Write From | |
| |
| |
Initialize | |
| |
| |
String Processing | |
| |
| |
Inspect | |
| |
| |
String | |
| |
| |
Unstring | |
| |
| |
Reference Modification | |
| |
| |
Accept | |
| |
| |
Duplicate Data Names | |
| |
| |
Qualification | |
| |
| |
Move Corresponding | |
| |
| |
The Car Billing Program | |
| |
| |
Programming Specifications | |
| |
| |
Program Design | |
| |
| |
The Completed Program | |
| |
| |
Limitations of COBOL-74 | |
| |
| |
| |
Screen I-O | |
| |
| |
ACCEPT | |
| |
| |
Programming Tip: Micro Focus Level 78-The Use of COBOL Constants | |
| |
| |
DISPLAY | |
| |
| |
The Tuition Billing Program Revisited | |
| |
| |
Programming Specifications | |
| |
| |
Hierarchy Chart | |
| |
| |
Pseudocode | |
| |
| |
The Completed Program | |
| |
| |
Programming Tip: The Hidden Power of the Alt key | |
| |
| |
Car Validation and Billing Program | |
| |
| |
Programming Specifications | |
| |
| |
The Screen Section | |
| |
| |
Hierarchy Chart | |
| |
| |
Pseudocode | |
| |
| |
The Completed Program | |
| |
| |
Limitations of COBOL-74 | |
| |
| |
| |
Introduction to Tables | |
| |
| |
Introduction to Tables | |
| |
| |
OCCURS Clause | |
| |
| |
Processing a Table | |
| |
| |
Perform Varying | |
| |
| |
A Second Example | |
| |
| |
Problems with the OCCURS Clause | |
| |
| |
Rules for Subscripts | |
| |
| |
Relative Subscripting | |
| |
| |
USAGE Clause | |
| |
| |
Occurs Depending On | |
| |
| |
The Student Transcript Program | |
| |
| |
Programming Specifications | |
| |
| |
Program Design | |
| |
| |
The Completed Program | |
| |
| |
Indexes versus Subscripts | |
| |
| |
The SET Statement | |
| |
| |
Limitations of COBOL-74 322 | |
| |
| |
| |
Table Lookups | |
| |
| |
System Concepts | |
| |
| |
Types of Codes | |
| |
| |
Characteristics of Codes | |
| |
| |
Sequential Table Lookup | |
| |
| |
Binary Table Lookup | |
| |
| |
Positional Organization and Direct Lookups | |
| |
| |
Initializing a Table | |
| |
| |
Hard Coding | |
| |
| |
Input-Loaded Tables | |
| |
| |
Table Lookups | |
| |
| |
Perform Varying Statement | |
| |
| |
SEARCH Statement | |
| |
| |
Programming Tip-Restrict Subscripts and Switches to a Single Use | |
| |
| |
SEARCH ALL Statement | |
| |
| |
Direct Lookup | |
| |
| |
Range-Step Tables | |
| |
| |
A Complete Example | |
| |
| |
Programming Specifications | |
| |
| |
Program Design | |
| |
| |
The Completed Program | |
| |
| |
Limitations of COBOL-74 | |
| |
| |
| |
Multilevel Tables | |
| |
| |
System Concepts | |
| |
| |
COBOL Implementation | |
| |
| |
One-Level Tables | |
| |
| |
Perform Varying | |
| |
| |
Two-Level Tables | |
| |
| |
Errors in Compilation | |
| |
| |
Perform Varying | |
| |
| |
A Sample Program | |
| |
| |
Programming Specifications | |
| |
| |
Program Design | |
| |
| |
The Completed Program | |
| |
| |
Three-Level Tables | |
| |
| |
Perform Varying | |
| |
| |
A Sample Program | |
| |
| |
Programming Specifications | |
| |
| |
The Completed Program | |
| |
| |
Table Lookups | |
| |
| |
A Calorie Counter's Delight | |
| |
| |
Programming Specifications | |
| |
| |
Range-Step Tables | |
| |
| |
The Completed Program | |
| |
| |
Limitations of COBOL-74 | |
| |
| |
| |
Sorting | |
| |
| |
System Concepts | |
| |
| |
Collating Sequence | |
| |
| |
Embedded Sign | |
| |
| |
COBOL Implementation | |
| |
| |
SORT Statement | |
| |
| |
SD (Sort Description) | |
| |
| |
RELEASE and RETURN | |
| |
| |
Programming Specifications | |
| |
| |
USING/GIVING Option | |
| |
| |
Input Procedure/Output Procedure Option | |
| |
| |
Comparing Options | |
| |
| |
MERGE Statement | |
| |
| |
Limitations of COBOL-74 | |
| |
| |
| |
Control Breaks | |
| |
| |
System Concepts | |
| |
| |
Running versus Rolling Totals | |
| |
| |
One-Level Control Breaks | |
| |
| |
Programming Specifications | |
| |
| |
Hierarchy Chart | |
| |
| |
Pseudocode | |
| |
| |
The Completed Program | |
| |
| |
Two-Level Control Breaks | |
| |
| |
Hierarchy Chart | |
| |
| |
Pseudocode | |
| |
| |
The Completed Program | |
| |
| |
Three-Level Control Breaks | |
| |
| |
Hierarchy Chart | |
| |
| |
Pseudocode | |
| |
| |
The Completed Program | |
| |
| |
Programming Tip: How to Write a Control Break Program | |
| |
| |
Limitations of COBOL-74 | |
| |
| |
| |
Subprograms | |
| |
| |
Subprograms | |
| |
| |
Called and Calling Programs | |
| |
| |
COPY Statement | |
| |
| |
Calling By Content And By Reference | |
| |
| |
Programming Tip: Use COPY to Pass Parameters | |
| |
| |
INITIAL Clause | |
| |
| |
A System for Physical Fitness | |
| |
| |
Programming Specifications | |
| |
| |
Hierarchy Chart | |
| |
| |
Pseudocode | |
| |
| |
The Completed Programs | |
| |
| |
Main Program (FITNESS) | |
| |
| |
Input Program (INPUTSUB) | |
| |
| |
Weight-Range Program (WGTSUB) | |
| |
| |
Training Program (TRAINSUB) | |
| |
| |
Display Program (DSPLYSUB) | |
| |
| |
Time Program (TIMESUB) | |
| |
| |
The Linkage Editor | |
| |
| |
Problems with the Linkage Editor | |
| |
| |
Limitations of COBOL-74 | |
| |
| |
| |
Sequential File Maintenance | |
| |
| |
System Concepts | |
| |
| |
Sequential versus Nonsequential Processing | |
| |
| |
Periodic Maintenance | |
| |
| |
Data Validation | |
| |
| |
Programming Specifications | |
| |
| |
Designing the Program | |
| |
| |
The Completed Program | |
| |
| |
Sequential File Maintenance | |
| |
| |
Programming Specifications | |
| |
| |
The Balance Line Algorithm | |
| |
| |
Designing the Hierarchy Chart | |
| |
| |
Top-Down Testing | |
| |
| |
The Stubs Program | |
| |
| |
The Completed Program | |
| |
| |
| |
Indexed Files | |
| |
| |
System Concepts | |
| |
| |
COBOL Implementation | |
| |
| |
Creating an Indexed File | |
| |
| |
Programming Specifications | |
| |
| |
Pseudocode | |
| |
| |
The Completed Program | |
| |
| |
Additional COBOL Elements | |
| |
| |
Open | |
| |
| |
Read | |
| |
| |
Write | |
| |
| |
Rewrite | |
| |
| |
Delete | |
| |
| |
Maintaining an Indexed File | |
| |
| |
Programming Specifications | |
| |
| |
Hierarchy Chart | |
| |
| |
Pseudocode | |
| |
| |
The Completed Program | |
| |
| |
Alternate Record Key | |
| |
| |
Programming Specifications | |
| |
| |
Concatenated Key | |
| |
| |
The START Statement | |
| |
| |
Limitations of COBOL-74 | |
| |
| |
| |
The Year 2000 Problem | |
| |
| |
The Year 2000 Problem | |
| |
| |
Date Arithmetic | |
| |
| |
COBOL Intrinsic Calendar Functions | |
| |
| |
Leap-Year Problem | |
| |
| |
Retirement Program Revisited | |
| |
| |
| |
Object-Oriented COBOL Programming | |
| |
| |
The Next Generation of COBOL | |
| |
| |
The Development of Structured Programming | |
| |
| |
Terminology | |
| |
| |
The Object-Oriented versus Structured Paradigm | |
| |
| |
Student-Look-UP Program | |
| |
| |
The Registrar Class | |
| |
| |
Classes and Inheritance | |
| |
| |
ProcessRequests Method | |
| |
| |
The StudentDM Class | |
| |
| |
The StudentDM Instance Definition | |
| |
| |
The Student Class | |
| |
| |
The Person Class | |
| |
| |
The Student UI Class | |
| |
| |
The Student PRT Class | |
| |
| |
Conclusion | |
| |
| |
| |
Micro Focus Personal COBOL for Windows: UsersGuide and Tutorial | |
| |
| |
| |
Getting Started | |
| |
| |
| |
Reserved Words | |
| |
| |
| |
COBOL-85 Reference Summary | |
| |
| |
| |
COBOL 1997, 1998, 1999, 2000, or ...? | |
| |
| |
| |
Answers to Odd-Numbered Exercises | |
| |
| |
| |
Projects | |
| |
| |
Index | |