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.
Solution: Trace the control flow - COBOL Tutorial
From the course: Migrating COBOL Apps
Solution: Trace the control flow
(upbeat music) - [Instructor] Let's open the Flow program. Nano -l flow.com. To trace the control flow, we start at line 18 by recording the value of the switches at program start. Let's now go to line 42 where we read in and set WS-Switch 4 to four. And then follow the perform to the code starting at CONDSET-AQ and continuing through to the label AQSET. We find CONDSET-AQ at line 89. And at line 90, a display to show where we are. At line 91, we increment switch five, which makes it one. And if it's greater than 20, we'll go to the label SKIPPER. We don't take this jump. At line 93, we set switches two and three to the value AQ. At line 94, we add three to switch four, making it now seven. In the check following this, it's not greater than nine, so we don't reset it. At line 96, we check switch 1A, which is currently V. So we do take the jump to the adjuster level. Know that in doing this, we've…
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
-
-
-
-
-