unit 1 unit 1 stephen s. linkin houston community college system 8/28/2007 1 copywrite © houston...
TRANSCRIPT
1
ITSE1402 Programming
COBOL & CICS CODEUNIT 1 Stephen S. Linkin
Houston Community College System
8/28/2007Copywrite ©Houston Community College System 2007
z/Syste
ms
GraphicsCourtesy of IBM. And Course Technologies (Shelly and Cashman)
2
CHAPTER 1 INTRODUCTION
Advantages of COBOL Disadvantages of COBOL
8/28/2007
3
INFORMATION PROCESSING
Stream input/output vs. record input/output Blocking Records
8/28/2007
4
STEPS IN THE PROGRAMMING PROCESS Step 1 - Understand the problem Step 2 - Design the program Step 3 - Code the program Step 4 - Test the program Step 5 - Document the program
8/28/2007
5
SEQUENCE
STRUCTURED PROGRAMMING
Top-down design/top-down programming Divisions of a COBOL program
◦ IDENTIFICATION DIVISION◦ ENVIRONMENT DIVISION◦ DATA DIVISION◦ PROCEDURE DIVISION
8/28/2007
SELECTCASE
ITERATION
ITERATION
Copywrite Houston Community College System 2007
6
COBOL RESERVED WORDS
8/28/2007
Copywrite Houston Community College System 2007
7
COBOL CODING FORMAT
8/28/2007
Copywrite Houston Community College System 2007
8
CHAPTER 2 INTRODUCTION
A case study
8/28/2007
Copywrite Houston Community College System 2007
9
PREPARING PROGRAM LOGIC
Hierarchy charts Pseudocode Flowcharts
8/28/2007
Copywrite Houston Community College System 2007
10
IDENTIFICATION DIVISION
PROGRAM-ID AUTHOR,
INSTALLATION, DATE-WRITTEN, and DATE-COMPILED
Comment box Format notation
8/28/2007
Copywrite Houston Community College System 2007
11
ENVIRONMENT DIVISION
SELECT statements
8/28/2007
Copywrite Houston Community College System 2007
12
DATA DIVISION
FILE SECTION FD level indicator
◦ Level numbers Picture clauses WORKING-STORAGE
SECTION SWITCHES ACCUMULATORS Work area fields
8/28/2007
Copywrite Houston Community College System 2007
13
PROCEDURE DIVISION
MAIN-PROGRAM Initialization Process-file Process-record Heading routine Wrap-up
8/28/2007
Copywrite Houston Community College System 2007
14
CHAPTER 3 INTRODUCTION
Designing the Inventory Vendor Report◦ Inventory Vendor Report◦ Hierarchy chart◦ Program flowchart◦ Inventory File record layout◦ Inventory Vendor Report program
8/28/2007
Copywrite Houston Community College System 2007
15
ENVIRONMENT DIVISION
CONFIGURATION SECTION SPECIAL NAMES INPUT-OUTPUT SECTION
8/28/2007
Copywrite Houston Community College System 2007
16
DATA DIVISION
Data categories◦ Alphabetic (Text)◦ Alphanumeric (Mixed)◦ Numeric◦ Alphanumeric Edited◦ Numeric Edited
8/28/2007
Copywrite Houston Community College System 2007
17
EDIT PATTERNS
Floating dollar signs Plus sign Minus sign Credit symbol and debit symbol Blank, zero, and slash BLANK WHEN ZERO clause JUSTIFIED RIGHT clause Scaling — P symbol
8/28/2007
Copywrite Houston Community College System 2007
18
DATANAME QUALIFICATION
COBOL Field names must be unique Qualified Names (Implied Duplication)
8/28/2007
Copywrite Houston Community College System 2007
218/28/2007
End of Presentation