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

Solution: Trace the control flow - COBOL Tutorial

From the course: Migrating COBOL Apps

Start my 1-month free trial

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…

Contents