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

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…

Contents