CS 10241 CS 1024 - Computing for Business Instructor:David Tucker GTA:Batul Mirza.

16
CS 1024 1 CS 1024 - Computing for Business Instructor: David Tucker GTA: Batul Mirza

Transcript of CS 10241 CS 1024 - Computing for Business Instructor:David Tucker GTA:Batul Mirza.

Page 1: CS 10241 CS 1024 - Computing for Business Instructor:David Tucker GTA:Batul Mirza.

CS 1024 1

CS 1024 - Computing for Business

Instructor: David Tucker

GTA: Batul Mirza

Page 2: CS 10241 CS 1024 - Computing for Business Instructor:David Tucker GTA:Batul Mirza.

CS 1024 2

Overview of the Course Syllabus Use of computers in

business Introduction to

programming using COBOL

Page 3: CS 10241 CS 1024 - Computing for Business Instructor:David Tucker GTA:Batul Mirza.

CS 1024 3

Brief Introduction to Computers

Computer hardware PC & components Mainframes

Computer software Programs which cause a

computer to carry out a task Sequential instructions Processes data Examples

Data Raw fact

Information Organized and processed Form that is meaningful

Page 4: CS 10241 CS 1024 - Computing for Business Instructor:David Tucker GTA:Batul Mirza.

CS 1024 4

Types of Processing Batch processing

Submit a job – wait – get results

Ex. Monthly payroll processing

Posting to general the ledger

Validation checks Interactive processing

Interaction with a computer through a terminal

Personal computer

Page 5: CS 10241 CS 1024 - Computing for Business Instructor:David Tucker GTA:Batul Mirza.

CS 1024 5

Business Data Processing

COBOL : common business oriented language

Characteristics of B.D.P. Many large data files Relatively few computations Lots of reports

Typical tasks of B.D.P. Rearrange data Change data’s appearance Compare data items Locate items Summarize Tabulate Combine data

Page 6: CS 10241 CS 1024 - Computing for Business Instructor:David Tucker GTA:Batul Mirza.

CS 1024 6

Algorithm A natural language

statement of a systematic procedure for solving a problem.

Algorithm Characteristics Must terminate Have zero or more inputs Have one or more outputs Each step unambiguous

Page 7: CS 10241 CS 1024 - Computing for Business Instructor:David Tucker GTA:Batul Mirza.

CS 1024 7

Examples of Algorithms Add 2 numbers

Get num1 Get num2 Sum <- num1 + num2 Write sum

Calculate Pay Get rate of pay Get hours worked pay <- rate_of_pay *

hours worked Write pay

Page 8: CS 10241 CS 1024 - Computing for Business Instructor:David Tucker GTA:Batul Mirza.

CS 1024 8

Languages Machine

0 & 1s only Low-level

Assembly Managing memory

High-level COBOL, C, Pascal Machine does the work

of translating Natural language

English Spanish

Page 9: CS 10241 CS 1024 - Computing for Business Instructor:David Tucker GTA:Batul Mirza.

CS 1024 9

COBOL Features English-like Self-documenting “sort of” Data declaration

“location” File structure Records

Fixed decimal data handling

Separates machine independent and machine dependant parts “Environment Division”

Page 10: CS 10241 CS 1024 - Computing for Business Instructor:David Tucker GTA:Batul Mirza.

CS 1024 10

Data Organization Data is composed of 3 types of

characters1. Digits or numeric characters

(0,1,…9)2. Letters or alphabetic characters

(A,B,…Z)3. Special characters (coma,

decimal point, equal sign, space, etc.)

Field hold a piece of information Alphanumeric field Numeric field

Record Related fields

File Records that are used together

Page 11: CS 10241 CS 1024 - Computing for Business Instructor:David Tucker GTA:Batul Mirza.

CS 1024 11

Programming Specifications

Program name Narrative or additional info Input File(s) Input Record Layout

Fields in which location of the row Data Report Layout Processing Requirement

File Filtering Printing

Page 12: CS 10241 CS 1024 - Computing for Business Instructor:David Tucker GTA:Batul Mirza.

CS 1024 12

Logic Write out the logic before

you start coding Pseudocode Flow chart

Page 13: CS 10241 CS 1024 - Computing for Business Instructor:David Tucker GTA:Batul Mirza.

CS 1024 13

Divisions of a COBOL Program

1. IDENTIFICATION DIVISION – provides basic information about the program such as a name

2. ENVIRONMENT DIVISION – Specifies the computer hardware that is to be used when the program is compiled and executed

Page 14: CS 10241 CS 1024 - Computing for Business Instructor:David Tucker GTA:Batul Mirza.

CS 1024 14

Divisions Cont. DATA DIVISION – defines

the characteristics of the files, records, and fields to be used in the program. File section

FD (file description) SELECT statement Level numbers

Relation to each other 01 – record description entry05 – field entry

Record description Working-storage section

Define data that does not appear in the input or output.

Page 15: CS 10241 CS 1024 - Computing for Business Instructor:David Tucker GTA:Batul Mirza.

CS 1024 15

Divisions Cont.

PROCEDURE DIVISION – specifies the processing steps to be followed by the computer when the program is executed. Paragraphs (procedures) PERFORM statement IF statement READ statement

Test data

Page 16: CS 10241 CS 1024 - Computing for Business Instructor:David Tucker GTA:Batul Mirza.

CS 1024 16

Elements of COBOL

Reserved words Programmer-supplied names

Paragraph names Data names File names

Literals Numeric Non numeric

Symbols Punctuation Arithmetic Relational

Level numbers Pictures