Title: CS 313001Day 2
1CS 313-001 Day 2
- Chapter 1
- Introduction to COBOL and Program Development
2Todays Outline
- Handouts
- Roll
- CoE Labs Log in
- Lab Materials
- Chapter 1
3NOTE College of Engineering Laboratory Accounts
- All students in CS 313 have an account on the CoE
systems. - Your userid is ltfirst letter of first namegtltfirst
letter of last namegtltlast four digits of
UniversityWide IDgt. - So if your name was Jane Doe with a University
wide ID of 12345678, your userid would be
JD5678. Your initial password is the same as
your userid. If anyone has a problem with your
account, please go to MIB 325 for assistance.
4You will have mastered the material in Chapter 1
when you can
- Identify the advantages and disadvantages of
COBOL - Understand the difference between record
input/output and stream input/output - List the steps required by the programming
process - Name the logic structures used in a structured
program
5- Describe the top-down design and top-down
programming - Name the four divisions of a COBOL program
- Specify the purpose of each COBOL division
- Identify valid COBOL words
- Describe the format of a line of COBOL source code
6COBOL is an acronym for
- COmmon
- Business
- Oriented
- Language
7COBOL
- Was first released in 1960 as a result of a joint
effort of industry, major universities, and the
United States government. - The purpose of COBOL was to provide a high-level
computer programming language for the business
world.
8High-Level Language
- A high-level language is one that can be
transferred easily from one working knowledge of
a computers internal components. - Examples
- COBOL, BASIC, Java, and Pascal are examples of
high-level languages.
9Low-Level Language
- A low-level language is a programming language
that requires knowledge of a computers internal
components and cannot be transferred from one
computer system to another. - Examples
- Machine language and Assembly language are
examples of a low-level language.
10Advantages of COBOL
- 1. COBOL has been widely accepted and used for
more than 35 years. - 2. Many businesses have a great investment in
COBOL programs. - 3. COBOL is machine independent.
- 4. COBOL is English-like and self- documenting.
- 5. COBOL is easy to read and understan.d
11Disadvantages of COBOL
- 1. COBOL programs tend to be very wordy.
- 2. COBOL programs require many pages of code to
accomplish a task that requires only a page of
two in another language. - 3. COBOL tends to generate object code that is
less efficient than the code generated by a
low-level language. - 4. COBOL is not designed to handle scientific
or process control applications.
12Information Processing
- Stream Input/Output
- ACCEPT statement
- DISPLAY statement
13Basic Terms
- A field is a basic fact.
- Ex. Name, Address, CWID, Zip Code
- A record is a group of related fields.
- A file is a group of related records.
14Fields(Facts)
Records(Group of Fields)
Name John AdamsCredits 90Major Political
Science Name Amelia EarhartCredits 120Major
Aviation Name Orville WrightCredits 115Major
Engineering Name Georgia OKeeffeCredits 125
Major Art
Amelia Earhart 120 Aviation
Orville Wright 115 Engineering
Fields, Records, and Files
15Programming Specification
- Input,
- Processing and,
- Output requirements
16Input, Processing, and Output
INPUT
PROCESSING
OUTPUT
STUDENT NAME ORVILLE WRIGHT
17Blocked versus Unblocked Records
(a) Unblocked Records(One Logical Record per
Physical Record)
(b) Blocking Factor of Two(Two Logical Records
per Physical Record)
(b) Blocking Factor of Three(Three Logical
Records per Physical Record)
18Steps in the Programming Process
- 1. Understand the Problem
- 2. Design the Program
- 3. Code the Program
- 4. Test the Program
- 5. Document the Program