From the course: Migrating COBOL Apps
Unlock the full course today
Join today to access over 24,300 courses taught by industry experts.
Remove dead code - COBOL Tutorial
From the course: Migrating COBOL Apps
Remove dead code
- [Instructor] Let's go back and have another look to our desr-2 code, nano -l desr-2.00.cob. At line 371, we can see the DESR-DUMP routine. It prints out a message saying CALCULATION STEP and then goes into a loop, setting up 64 bits in the print line before printing it. This is done for the J1 index of AC. And we don't set J1. So this is an external permute to the dump section. We can use Control + W to check where this section is called. (keyboard clattering) we'll search for DESR-DUMP. Okay, and if we try again. Okay, it's not called anywhere. This is its only occurrence in the code. Let's check if J1 is set anywhere. Control + W, and we'll check for J1. And it occurs here. And we have it defined, and it occurs when we use it. Okay, we defined J1 and we used it in the dump routine, but it's not actually set anywhere. Let's have a look at J2. That's used in the dump routine. And we defined it, and it's…
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
-
-
-
-
-
-
-
Prepare to refactor code1m 56s
-
(Locked)
Refactor the DESR application8m 25s
-
(Locked)
Remove redundant labels1m 19s
-
(Locked)
Resize applications1m 30s
-
(Locked)
Make code segments generic5m 30s
-
(Locked)
Challenge: Refactoring32s
-
(Locked)
Solution: Refractoring3m 14s
-
(Locked)
Introduce structure through subprograms2m 39s
-
(Locked)
Remove dead code3m 27s
-
(Locked)
Refactor data1m 58s
-
(Locked)
The challenges of migrating to a relational database4m 4s
-
(Locked)
Refactoring, continuous integration, and self-testing3m 52s
-
(Locked)
Observations on the paradigm shift2m 21s
-
(Locked)
The refactoring catalog2m 44s
-
-
-