![]() |
Structured COBOL Programming
| Duration: 5 days |
| Participants: Application programmers and developers. |
|
Objectives:
Upon successful completion of this course you will be able to:
- Take maximum advantage of COBOL II's structured features to develop easy-to-maintain, comprehensible programs. - Use tools such as functional decomposition (hierarchy charts/action diagrams) and pseudocode to analyze and model the logic of a program. - Implement a structured program using top-down modular design and the fundamental logic structures. - Lead and participate in peer reviews in the form of structured walkthroughs. |
| Overview: This course takes you from design to finished code focusing on structure in every step of the process from structured design through structured coding and testing, including the use of TSO structured facilities. In the workshops, you design, code, test, and debug a variety of programs that use logic structures fundamental to business applications. If students are making a transition from OS/VS COBOL to COBOL II and also need to strengthen their structured programming skills, we can meet their needs by combining this course with our COBOL II Differences workshop. |
| Prerequisites: COBOL or COBOL II programming experience is required. |
| Format: Lecture and discussion with extensive hands-on exercises. |
|
Topic Outline:
- Introduction to Structured Programming Logic Tools Benefits of standard logic tools Team approach to programming Position in the structured design life cycle The tools Functional decomposition Pseudocode Structured walkthrough - Implementing a Read-Process-Write Program Functional decomposition Pseudocode Coding the program Differences between COBOL and COBOL II In-line vs separate PERFORMs Placement of "priming" READs Avoiding periods Setting 88-level switches - Understanding and Using Structured Logic Tools Modules Modular independence Module information Single entry/exit Functional decomposition - hierarchy charts Top-down design Coupling and cohesion Concept and uses Rules Pseudocode Basic control structures Sequence Selection (IF-THEN-ELSE and DO CASE) Iteration (DO WHILE and PERFORM UNTIL) HIPO (Hierarchical Input-Process-Output) Charts Flow of data Harmful effects of GOTOs Structured walkthrough Objectives and purpose Role of the participants Developing effective communication Code implementation Self-documenting code Naming conventions Indentation Literals with special meaning Use of periods - Implementing a Report Printing Module Providing for headers, footers, and line counters Functional decomposition Pseudocode Review of sample program Differences between COBOL and COBOL II - Implementing Data Validation and Sequence Check Routines Functional decomposition Pseudocode Structured walkthrough Review of sample program Differences between COBOL and COBOL II Nested IFs vs EVALUATE TRANSLATE vs INSPECT NEXT SENTENCE vs CONTINUE Expanded use of 88 levels - Implementing One-Level Control Break Functional decomposition Pseudocode Structured walkthrough Coding the program Differences between COBOL and COBOL II Placement of "re-initializing" code - Implementing Two-Level Control Break Functional decomposition Pseudocode Structured walkthrough Coding the program Differences between COBOL and COBOL II Placement of "re-initializing" code - Implementing Control Break with Three or More Levels Functional decomposition Pseudocode - Implementing a Transaction Master Update Comparison to file merge Functional decomposition Pseudocode Structured walkthrough Coding the program - Creating and Processing Tables Definition in DATA DIVISION One-dimensional tables PERFORM formats: COBOL vs COBOL II Comparison of indexing and subscripting Location in main storage Initializing and altering values Differences in processing efficiency Debugging differences Techniques to initialize tables REDEFINES VALUE on group item Calculate values Load values from file Initializing tables at: Compile time Execution time Processing tables One occurrence, section of table, entire table Serial search Binary search Handling out-of-bounds situations - Implementing One-Dimensional Table Processing Functional decomposition Pseudocode Structured walkthrough Coding the program Differences between COBOL and COBOL II Use of SET - Processing Variable-Length and Large Tables Definition in DATA DIVISION Variable-length tables Concept Defining the length (OCCURS . . . DEPENDING ON . . .) Program logic to load and process table Processing V, VB, and VBS records Large table handling techniques Table limitations in COBOL and COBOL II Breaking up a table Disk tables USAGE IS INDEXED - Implementing One-Dimensional Variable-Length Table Processing Functional decomposition Pseudocode Structured walkthrough Coding the program Differences between COBOL and COBOL II - Implementing Two-Dimensional Table Processing Multidimensional tables Definition in DATA DIVISION Processing considerations Functional decomposition Pseudocode Structured walkthrough Coding the program - Implementing Mixed One- and Two-Dimensional Table Processing Combining one, two, and three dimensions in a table Definition in DATA DIVISION Processing considerations Functional decomposition Pseudocode Structured walkthrough Coding the program Differences between COBOL and COBOL II - Implementing Multi-Level Control Break with Complexities Handling complexities such as "Page # of #" Functional decomposition Pseudocode Structured walkthrough Coding the program Review of sample program Differences between COBOL and COBOL II Handling complexities Placement of "re-initializing" code - Subprogram Linkage CALL statement Passing parameters LINKAGE SECTION STOP RUN vs GOBACK CANCEL Static vs dynamic calls Reentrant programs Multiple entry points Running below or above the 16-megabyte line: DATA(24) and DATA(31) AMODE and RMODE Basic Linkage Editor control statements Linking from object or load modules Passing data vs passing addresses < CALL BY CONTENT / CALL BY REFERENCE Passing data from the JCL Nested programs - Implementing Subprogram Linkage Functional decomposition Pseudocode Structured walkthrough Coding the program Differences between COBOL and COBOL II - CICS Programs Structured logic considerations Bending the rules Review of sample programs - DB2 Programs with Cursors Structured logic considerations Direct data access considerations When the rules are broken Processing variable-length fields (STRING / UNSTRING) Review of sample programs |
|
|