unit 1 unit 1 stephen s. linkin houston community college system 8/28/2007 1 copywrite © houston...

19
ITSE1402 Programming COBOL & CICS CODE UNIT 1 Stephen S. Linkin Houston Community College System 8/28/2007 1 Copywrite © Houston Community College System 2007 z/Systems Graphics Courtesy of IBM. And Course Technologies (Shelly and Cashman)

Upload: ophelia-craig

Post on 16-Jan-2016

220 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: UNIT 1 UNIT 1 Stephen S. Linkin Houston Community College System 8/28/2007 1 Copywrite © Houston Community College System 2007 Graphics Courtesy of IBM

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)

Page 2: UNIT 1 UNIT 1 Stephen S. Linkin Houston Community College System 8/28/2007 1 Copywrite © Houston Community College System 2007 Graphics Courtesy of IBM

2

CHAPTER 1 INTRODUCTION

Advantages of COBOL Disadvantages of COBOL

8/28/2007

Page 3: UNIT 1 UNIT 1 Stephen S. Linkin Houston Community College System 8/28/2007 1 Copywrite © Houston Community College System 2007 Graphics Courtesy of IBM

3

INFORMATION PROCESSING

Stream input/output vs. record input/output Blocking Records

8/28/2007

Page 4: UNIT 1 UNIT 1 Stephen S. Linkin Houston Community College System 8/28/2007 1 Copywrite © Houston Community College System 2007 Graphics Courtesy of IBM

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

Page 5: UNIT 1 UNIT 1 Stephen S. Linkin Houston Community College System 8/28/2007 1 Copywrite © Houston Community College System 2007 Graphics Courtesy of IBM

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

Page 6: UNIT 1 UNIT 1 Stephen S. Linkin Houston Community College System 8/28/2007 1 Copywrite © Houston Community College System 2007 Graphics Courtesy of IBM

Copywrite Houston Community College System 2007

6

COBOL RESERVED WORDS

8/28/2007

Page 7: UNIT 1 UNIT 1 Stephen S. Linkin Houston Community College System 8/28/2007 1 Copywrite © Houston Community College System 2007 Graphics Courtesy of IBM

Copywrite Houston Community College System 2007

7

COBOL CODING FORMAT

8/28/2007

Page 8: UNIT 1 UNIT 1 Stephen S. Linkin Houston Community College System 8/28/2007 1 Copywrite © Houston Community College System 2007 Graphics Courtesy of IBM

Copywrite Houston Community College System 2007

8

CHAPTER 2 INTRODUCTION

A case study

8/28/2007

Page 9: UNIT 1 UNIT 1 Stephen S. Linkin Houston Community College System 8/28/2007 1 Copywrite © Houston Community College System 2007 Graphics Courtesy of IBM

Copywrite Houston Community College System 2007

9

PREPARING PROGRAM LOGIC

Hierarchy charts Pseudocode Flowcharts

8/28/2007

Page 10: UNIT 1 UNIT 1 Stephen S. Linkin Houston Community College System 8/28/2007 1 Copywrite © Houston Community College System 2007 Graphics Courtesy of IBM

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

Page 11: UNIT 1 UNIT 1 Stephen S. Linkin Houston Community College System 8/28/2007 1 Copywrite © Houston Community College System 2007 Graphics Courtesy of IBM

Copywrite Houston Community College System 2007

11

ENVIRONMENT DIVISION

SELECT statements

8/28/2007

Page 12: UNIT 1 UNIT 1 Stephen S. Linkin Houston Community College System 8/28/2007 1 Copywrite © Houston Community College System 2007 Graphics Courtesy of IBM

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

Page 13: UNIT 1 UNIT 1 Stephen S. Linkin Houston Community College System 8/28/2007 1 Copywrite © Houston Community College System 2007 Graphics Courtesy of IBM

Copywrite Houston Community College System 2007

13

PROCEDURE DIVISION

MAIN-PROGRAM Initialization Process-file Process-record Heading routine Wrap-up

8/28/2007

Page 14: UNIT 1 UNIT 1 Stephen S. Linkin Houston Community College System 8/28/2007 1 Copywrite © Houston Community College System 2007 Graphics Courtesy of IBM

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

Page 15: UNIT 1 UNIT 1 Stephen S. Linkin Houston Community College System 8/28/2007 1 Copywrite © Houston Community College System 2007 Graphics Courtesy of IBM

Copywrite Houston Community College System 2007

15

ENVIRONMENT DIVISION

CONFIGURATION SECTION SPECIAL NAMES INPUT-OUTPUT SECTION

8/28/2007

Page 16: UNIT 1 UNIT 1 Stephen S. Linkin Houston Community College System 8/28/2007 1 Copywrite © Houston Community College System 2007 Graphics Courtesy of IBM

Copywrite Houston Community College System 2007

16

DATA DIVISION

Data categories◦ Alphabetic (Text)◦ Alphanumeric (Mixed)◦ Numeric◦ Alphanumeric Edited◦ Numeric Edited

8/28/2007

Page 17: UNIT 1 UNIT 1 Stephen S. Linkin Houston Community College System 8/28/2007 1 Copywrite © Houston Community College System 2007 Graphics Courtesy of IBM

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

Page 18: UNIT 1 UNIT 1 Stephen S. Linkin Houston Community College System 8/28/2007 1 Copywrite © Houston Community College System 2007 Graphics Courtesy of IBM

Copywrite Houston Community College System 2007

18

DATANAME QUALIFICATION

COBOL Field names must be unique Qualified Names (Implied Duplication)

8/28/2007

Page 19: UNIT 1 UNIT 1 Stephen S. Linkin Houston Community College System 8/28/2007 1 Copywrite © Houston Community College System 2007 Graphics Courtesy of IBM

Copywrite Houston Community College System 2007

218/28/2007

End of Presentation