210 likes | 400 Views
Chapter 2 From Coding Form to Computer. Program 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. Program Development Process.
E N D
Program 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
Program 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
Program Development Process • Test • Adequate test data • Finalize Documentation
A START ENTER TEST DATA OBTAINPROGRAMSPECS PREPARECONTROLSTATEMENTS DEVELOP A HIERARCHY CHART DEVELOP AFLOWCHART ORPSEUDOCODE COMPILATIONERRORS? REVISE COBOL PROGRAM ENTER PROGRAMON CODING SHEETS TRUE FALSE ENTER PROGRAM USING TEXT EDITOR EXECUTIONERRORS? REVISE COBOLPROGRAM TRUE A FALSE STOP FIGURE 2.1 The Programming Process
COBOL 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
Preparing 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
FIGURE 2.3 Compile, Link, and Execute Sequence COBOLSTATEMENTS PROGRAM LISTING COMPILER OBJECTM0DULE SUBROUTINELIBRARIES LINKER LOADMODULE OTHER OBJECT MODULES EXECUTION OUTPUTREPORTS INPUT DATA
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 Testing and Debugging
Figure 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
FIGURE 2.6 Erroneous Input Data JOHN ADAMS 090POLITICAL SCI AMELIA EARHART 120AVIATION ORVILLE WRIGHT 115ENGINEER GEORGIA O’KEEFE 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
COMMON BUSINESS ORIENTED LANGUAGECOBOL • Structured • Standard • English Like
Historical Facts • Development began 1959 with Grace Hopper • ANSI -- CODASYL Committee • COBOL 68 first approved standard version • COBOL 74 • COBOL 85 • COBOL 9x
More Facts • WWW.ANSI.ORG • 150 - 20Obillion lines of source code • 40 - 50 % of applications • GUI • Object-Oriented