Prerequisites: COSC 110 or equivalent
Structured programming principles and techniques, as implemented through the ANSI COBOL language; program design using top-down techniques; program and project documentation; introduction to sequential and random file algorithms and integrated file systems.
Course Objectives
Upon successful completion of this course, the student should be able to:
- Develop data definitions and record structures from user problem specifications.
- Distinguish the environmental differences between various computing platforms as they relate to the execution of COBOL programs.
- Compile, link, and execute COBOL programs using available options.
- Recognize and use the correct COBOL syntax.
- Recognize how COBOL employs structured programming techniques to solve programming oriented problems.
- Differentiate between how COBOL handles the different file maintenance techniques.
- Design user-friendly screen displays for use with interactive COBOL programs.
Detailed Course Outline
1. Introduction to Structured Programming. (3 hours)
An insight into the process of designing and writing computer programs; the four phases of program development; the use of pseudocode and flowcharting in program development; use of structure charts in program design; modularization and module-numbering conventions. A brief look at COBOL from the historical perspective of programming languages and the tenacity of the COBOL language.
2. The COBOL Language Overview (3 hours)
COBOL format and terminology. A look at the Divisions of the COBOL language and an in-depth study of the contents of the first two Divisions. An exhaustive study of the COBOL metalanguage.
3. COBOL Data Types (4 hours)
The basic components of the COBOL DATA Division; COBOL data descriptions; Descriptions of input and output records. Fixed-length versus variable-length records. COBOL data storage types and internal data representation. A discussion of the most significant differences between ASCII and EBCDIC collating sequences.
4. The Procedure Division and Common Data Manipulation Verbs (3 hours)
Development of a full COBOL program; processing of loops in COBOL. An explanation for the use of the priming read in COBOL. A look at some COBOL verbs: OPEN, READ, MOVE, WRITE, CLOSE. Simple conditional operations using the IF statement. A look at simple arithmetic operations in COBOL.
5. Data Storage and Editing Standards (3 hours)
A more exhaustive look at the categories of PICTURE clauses. A study of the complete set of COBOL editing characters. Distinguishing between numeric and numeric-edited fields. Explain the difference between implied and actual decimal points. Learn the rules for signed numbers and editing characters. Predict the effect of data movement between fields.
6. Conditional Operations and Data Validation (3 hours)
Study of the various types of condition tests: relation, class, sign, and condition-name. A look at various validity tests in COBOL: numeric test, alphabetic test, consistency check, sequence check, completeness check, date check, and subscript check. Examination of compound conditions in COBOL and a description of the advantages of the END-IF and other scope terminators.
7. COBOL String Processing and Reference Modification (4 hours)
Differentiation between the DO WHILE and the DO UNTIL structures in COBOL. A look at some COBOL string processing statements like the INITIALIZE, INSPECT, STRING, UNSTRING, ACCEPT, and DISPLAY statements. A study of the basic reference modification principles.
8. Table Processing (4 hours)
Table definition and description of table use in COBOL programming. Distinguishing between fixed and variable length records. Differentiating between a subscript and an index. Distinguishing between sequential table lookup, binary table lookup, and direct access to table entries.
9. Multilevel Table Processing (3 hours)
A conceptual view of multidimensional tables. Implementation of a multidimensional table. Searching a multidimensional table.
10. File Sorting and Merging (4 hours)
Distinguishing between an internal sort, a utility sort, and the COBOL SORT statement. Differentiating between ascending and descending sorts; between major, intermediate, and minor keys. Defining a collating sequence. Explanation of the use of INPUT PROCEDURE and OUTPUT PROCEDURE routines in the SORT statement. Distinguishing between a sort and a merge.
11. Report Concepts and Control Break Programming (6 hours)
An examination of the general common areas of a good report design. A look at the general guidelines for report design. Defining control break; distinguishing between a single control break and multilevel control break programs. Distinguishing between running and rolling totals. Study of the single-level and two-level control break algorithms. Generalization to three-level, etc. algorithms.
12. COBOL Subprograms (4 hours)
Definition and implementation of subprograms in COBOL. Distinguishing between a called program and a calling program. Description of the purpose of the linkage-editor. The use of BY CONTENT and BY REFERENCE clauses as they relate to subprograms. Explanation of the meaning of unresolved external reference. Compilation, linkage and running of COBOL subprograms.
13. Sequential File Maintenance (4 hours)
Description of the file maintenance operation; distinguishing between old master, transaction, and new master files. Explanation of the three transaction types associated with file maintenance. Explaining how HIGH-VALUES and LOW-VALUES are used with the sequential update process. The basic sequential update algorithm.
14. Indexed File Processing (4 hours)
Explanation of how an indexed file enables both sequential and non-sequential retrieval of individual records. Introduction to indexed and virtual sequential file implementations. Distinguishing between indexed and virtual sequential file organizations. Study of Indexed file syntax in the ENVIRONMENT and DATA Divisions. Indexed file verbs in the PROCEDURE Division. Programming specifications for interactive file maintenance.
15. Interactive Program Design in COBOL (4 hours)
Discussion of the concept of interactive screen I/O versus the batch I/O approach. Description of the SCREEN Section and a discussion of how its use may be preferable to the individual ACCEPT and DISPLAY statements. Application of ergonomics in interactive program design. Explanation of the beneficial features of data validation using interactive programming as opposed to batch-oriented programming
Evaluation Methods
20% Homework assignments, class work, and quizzes. These will be based on material discussed in class.
40% Examinations. Two in-class exams (each of which counts 29 percent of the total examination points) and a final exam (which counts 42 percent of the total examination points). The examinations consist of short answer, explanation, analysis, and what-if questions.
40% Programming Projects. About six to seven projects of varying complexity each based on topics discussed so far in the semester.
Grading Scale: The standard grading scale will be used.
90%+ = A; 80-89% = B; 70-79% = C; 60-69% = D; below 60% = F
Suggested Projects:
Project #1: (duration: One week)
Compile/Link/Execute: Project comprises of a simple program furnished by the professor preferably with introduced errors. Students are informed of the errors and they employ the Language Sensitive Editor to eliminate the errors. Students then compile, link and execute the program for submission. Project should stress the use of the AT END scheme for detecting the end of file in program execution.
Project #2: (duration: One week)
A simple COBOL program. Project comprises of simple data manipulation, preferably just moving input fields to output fields. Professor may introduce simple arithmetic with the project. Students code the IDENTIFICATION, ENVIRONMENT, and DATA DIVISIONS; the PROCEDURE DIVISION will be furnished by the professor.
Project #3: (duration: Two weeks)
A simple COBOL report program with calculations. Project comprises of a COBOL program that does arithmetic, preferable with some decision structures involved. Professor supplies the input file and the program specifications. The specification should include the requirement for a formatted output. Students will have to code the entire program.
Project #4: (duration: Two weeks)
A table processing COBOL program. Project should require students to write a COBOL program that does table processing (preferably multi-level table processing using PERFORM VARYING in several dimensions). Professor supplies the program specifications and students code the program.
Project #5: (duration: Two weeks)
A COBOL control break program. Project would require students to code a multi-level control break program (preferable a two-level control break). The input file supplied to students need not be sorted and the project specification should demand that students sort the input file before its use in the program (preferable coding an INPUT PROCEDURE with the program).
Project #6: (duration: Two weeks)
A Sequential File Update program. Project would require students to update a master file with transactions either from a file or provided for interactive update. Preferably the specifications would require that student programs be able to handle multiple transactions belonging to particular records. Project may involve merging files to constitute the transactions or perhaps sorting the transaction file or both the master and transaction files.
Project #7: (duration: Two weeks)
A Nonsequential File Update program. Project would require students to develop an interactive program that would randomly update a master file with transactions.
Required Textbook(s), Supplementary Books and Readings
Grauer, Robert T. and Villar, C. V., COBOL: From Micro to Mainframe. Fourth Edition, Prentice-Hall Inc. Englewood Cliffs, New Jersey, April, 2000.
Keogh, J. E., and Keogh, J., COBOL Programmer’s Notebook. Prentice-Hall Inc. Englewood Cliffs, New Jersey, 1998.