From the course: Migrating COBOL Apps
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Legacy control flow - COBOL Tutorial
From the course: Migrating COBOL Apps
Legacy control flow
- [Presenter] Legacy COBOL was being used to build major application suites well before anybody thought of ideas such as structured coding or object orientation. Consequently, it has many coding constructs which are frowned on today, such as the GoTo statement. Using GoTo statements as a sure way to create what's known as spaghetti code in which the execution flows like strands of spaghetti through the code modules. This makes it difficult to keep track of exactly what code will be executed for each program function. Associated with the GoTo is the alter statement which enables code to be modified during execution. Meaning that static analysis doesn't reflect the control flows in the code. COBOL includes a perform verb which can be used to execute a paragraph or a series of paragraphs. However, this means that subsequent maintenance to that area of code, risks breaking the control flow. The perform verb doesn't allow for…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
Self-modifying code2m 1s
-
(Locked)
Dynamic calls to subprograms2m 20s
-
(Locked)
Understand XA transactions2m 27s
-
(Locked)
The buried update3m 52s
-
(Locked)
The deadly embrace1m 28s
-
(Locked)
Legacy control flow2m 52s
-
(Locked)
Challenge: Trace the control flow28s
-
(Locked)
Solution: Trace the control flow6m 38s
-
-
-
-
-