Title: Chapter 2 From Coding Form to Computer
1Chapter 2 From Coding Form to Computer
2Program Development Process
- Determine Specifications
- I/O Layout
- Processing rules
- Special Formulas
- Design the Program
- System Flow Chart
- Hierarchy / Structure Chart
- Pseudo Code / Logic Flow Chart
3Program Development Process
- Code and Enter the Program
- IDE - Integrated Development Environment
- Stand alone environment
- Compile
- Changes Source Code to Object Code
- Catches Syntax errors
- Link / Link Edit
- Combines your Object Code with other Object Code
4Program Development Process
- Test
- Adequate test data
- Finalize Documentation
5FIGURE 2.1 The Programming Process
6COBOL Coding Form
- 1 - 6 Line Numbers
- 7 Comment or Line Continuation -
- 8 - 12 Division Names Section Names Paragraph
Names FD and 01 - 13 - 72 Everything else
- 73 - 80 Program Name
7(No Transcript)
8(No Transcript)
9(No Transcript)
10(No Transcript)
11Preparing Your Program for Execution
- Create Source Code
- Compile - converts Source code to Object or
Machine Language - Link / Link Edit - combines your object code with
other needed object code to make an executable
load module - Execute - your load module
12FIGURE 2.3 Compile, Link, and Execute Sequence
COBOLSTATEMENTS
PROGRAM LISTING
COMPILER
OBJECTM0DULE
SUBROUTINELIBRARIES
LINKER
LOADMODULE
OTHER OBJECT MODULES
EXECUTION
OUTPUTREPORTS
INPUT DATA
13Testing and Debugging
- Errors
- Compile Time
- Syntax Errors
- Execution Time
- Logic errors
- Divide by Zero
- File Read
- Data Errors
- Debugging
- Desk Checking
- Correct Syntax
- Walk Through
- Good Test data
14Figure 2.4b COBOL Diagnostics
LINE ERR LVL ERROR TEXT 60 0138 W Period
assumed before IF 63 0787 E Undefined
symbol WRTE 64 0593 E No corresponding
active scope For END-IF seniorce has 1
Warning 2 E Level messages
COBOL statement number where error occurred
15FIGURE 2.6 Erroneous Input Data
JOHN ADAMS 090POLITICAL SCI AMELIA
EARHART 120AVIATION ORVILLE WRIGHT 115ENGINEER G
EORGIA OKEEFE 125ART MERIWETHER
LEWIS 115TRAVEL JOHN KENNEDY 115POLITICAL
SCI ALEX BELL 090ENGINEERING EMILY
DICKINSON 085LITERATRUE JOHN ROEBLING
115ENGINEERING
Engineering is spelled incorrectly
Data entered in wrong columns
16COMMON BUSINESS ORIENTED LANGUAGECOBOL
- Structured
- Standard
- English Like
17Historical Facts
- Development began 1959 with Grace Hopper
- ANSI -- CODASYL Committee
- COBOL 68 first approved standard version
- COBOL 74
- COBOL 85
- COBOL 9x
18More Facts
- WWW.ANSI.ORG
- 150 - 20Obillion lines of source code
- 40 - 50 of applications
- GUI
- Object-Oriented
19End of Chapter 2