click below
click below
Normal Size Small Size show me how
Cobol Test 1
Chapter 1
| Question | Answer |
|---|---|
| Data | Raw facts collected about people, objects, and events. (input) |
| Data Processing | Restructuring or reordering of data in order to increase its usefulness and value. |
| Information | The finished product or end-result from applying various data processing functions to data. (output) |
| Computer Program | An ordered sequence of instructions for solving a problem, placed in a form acceptable to the computer. |
| 3 components of the CPU (Central Processing Unit) | 1. Primary Storage/Main Memory 2. Arithmetic/Logic Unit 3. Control Unit |
| Primary Storage/Main Memory | where systems software, applications software, instructions, and data are stored during processing. - Cobol compiler resides here |
| Arithmetic/Logic Unit | special area of primary storage used for execution of arithmetic calculations and logical decisions |
| Control Unit | - controls all processing within the computer system, ranging from arithmetic calculations to logical decisions to input of data to the production of output on various output devices. - it also manages the execution of multiple programs at the same time |
| Compilation | translation of source program into an object program - checks for syntax errors before generating object program |
| Source Program | Program written in English-like, high-level language (such as Cobol, Visual Basic, etc) - Payroll.COB Cannot be executed or run by the computer until they have been compiled or translated into machine language |
| Object Program | equivalent machine language (binary code) instructions of the source program. -object programs are executable - Payroll.OBJ |
| Load Program | what gets run/executed generated when the linkage editor links the object program(s) into a single core image program - Payroll.EXE |
| Linkage Editor | program which loads all object programs/modules for a given computer job into primary storage and then links these modules into a load program |
| Translation/Execution Process | Source Program --> Compiler --> Object Program --> Linkage Editor --> Load Program |
| 5 Steps of Program Development Process | 1. Develop the problem statement 2. Develop an I/O design. Analyze the problem. 3. Develop the logic design 4. Develop the source code 5. Program testing and validation |
| 1st Step of Program Development Process | Develop a problem statement in terms of inputs, processes, and outputs. |
| 2nd Step of Program Development Process | Develop an I/O design. Analyze the problem. The problem is further refined in terms of inputs and outputs. The following tools/documents are used and/or produced: - file/record layouts - printer spacing charts - screen layout sheets |
| 3rd Step of Program Development Process | Develop the logic design. Plan the solution to the problem. The algorithm (method of solution) is devised. The following documents are produced: - structured flowcharts - pseudo-code - hierarchy chart |
| 4th Step of Program Development Process | Develop the source code using the logic design from step 3. This is where the Cobol program is written. |
| 5th Step of Program Development Process | Program testing and validation. Test and "debug" the program. Techniques include: - desk checking - compilation - program walk through - live testing (w/actual data) |
| A "Good Program" | 1. correctly solves the problem 2. is reliable and error-free, meaning that it consistently solves the problem 3. is easy to understand and maintain |
| Errors that must be removed from the program | 1. syntax errors 2. run-time errors 3. logic errors |
| Syntax Errors | Errors detected by the compiler during compilation Ex: punctuation, spelling, etc |
| Logic Errors | Detected during program execution, not during compilation, and result in incorrect output. Ex: when the sequence of programming steps is not specified properly or when the wrong instruction is coded (ADD instead of MULTIPLY) |
| Run-time Errors | Occurs of the computer cannot execute an instruction. Detected by the programmer when the program is tested during run-time. Ex: attempt to divide by zero or reading from a file that cannot be found |
| Flowchart | conventional block diagram providing pictorial representation of the logic to be used in a program |
| Pseudo-code | written with English-like expressions rather than diagrams and is specifically suited for depicting logic in a structured program |
| Hierarchy charts | used to show the relationships among sections in a program |
| Desk Checking | hard copy proof reading of program before it has been keyed in will minimize the overall time it takes to debug a program |
| Walk-through | manually steps through the logic of the program using the test data to see if the correct results will be obtained. |
| COBOL | COmmon Business-Oriented Language developed in 1959 by CODASYL Committee |
| Nature of Cobol | 1. Business Oriented Language - designed for commercial applications like payroll/inventory w/large volume of data 2. Standard Language - all compilers have same syntax rules 3. English-like Language 4. Relatively easy to understand |
| File/Record Layouts | Describe the formats of the input & output data on disk or other storage medium. They indicate: a)data item/field names w/in each record b)location of each data item w/in the record c)size of each data item d)for numeric data items, # of decimal positio |
| Print Spacing Charts | A tool used for determining the proper spacing of printed output. It specifies the precise print positions to be used in the output. It also includes all data items to be printed and their formats. |
| ANSI | American National Standards Institute an organization that develops standards for numerous technical fields |
| Structured Programming | The most important technique for improving the design of a program in any language. This technique uses logical control constructs that make programs easier to read, debug, and modify when changes are required |
| Modular Programming | each module can be tested independently |
| Module | Block of code that performs one processing task. The typical structured program is subdivided into paragraphs or modules, where a main module calls in other modules as needed. (all same --> paragraph/module/routine ) |
| Top-down Programming Design | executing downward developing major modules or procedures before minor ones gets more detailed as you go down |
| Identification Division | Identifies the program to the operating system. It also can provide documentation about the program. |
| Environment Division | Defines the file-names and describes the specific computer equipment that will be used by the program |
| Data Division | Describes the input and output formats to be used by the program. It also defines any constants and work areas necessary for processing of data. 1)File Section 2)Working-Storage Section |
| Procedure Division | Contains the instructions necessary for reading input, processing it, and creating output. Contains various executable commands |