CS CS Computing for Business Instructor:David Tucker GTA:Batul Mirza
CS Overview of the Course Syllabus Use of computers in business Introduction to programming using COBOL
CS 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
CS 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
CS 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
CS 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
CS 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
CS 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
CS 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”
CS Data Organization Data is composed of 3 types of characters 1. 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
CS 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
CS Logic Write out the logic before you start coding Pseudocode Flow chart
CS 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
CS 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 entry 05 – field entry Record description Working-storage section Define data that does not appear in the input or output.
CS 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
CS 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