Two and Three dimension tables

Speaker Notes

Slide 1:

These slides will show two and three dimension tables.

Slide 2:

This the the two dimension table example out on the Web. The name is twodim.cbl.

The IDENTIFICATION DIVISION, ENVIRONMENT DIVISION, FILE SECTION of the DATA DIVISION and the beginning of the WORKING-STORAGE SECTION of the DATA DIVISION are shown on this slide. The rest of the WORKING-STORAGE and the PROCEDURE DIVISION are shown on the remaining slides.

Slide 3:

This is the fare table drawn out and the definition of it in WORKING-STORAGE.

Slide 4:

This shows the tables that are set up in the WORKING-STORAGE section.


On the program on the Web, I called the 05 under the redefines TO-CITIES which was a poor name. I am changing it here to a more appropriate name FROM-CITIES. Notice that this has no impact on the program. The names used are for programmers to help them understand.

Slide 5:

This is the area in WORKING-STORAGE that controls the page printing and the headers.

Slide 6:

This shows the lines that MOVE the data from the tables to the fields on the print line.

Slide 7:

This is the part of the PROCEDURE DIVISION that deals with the headers, the date and the file closing.

Slide 8:

This is the output report that was produced.

Slide 9:

Looking at this table you can see that this table sets up the columns first and then the rows. The other table set up the rows first and then the columns.

Slide 10:

The TO-CITY code is the first subscript so it points to the 05 level and the FROM-CITY code is the second subscript so it points to the 10 level.

Slide 11:

This shows a three dimensional table. It is for phone calls. I call TO a place at Day, Evening or Night rates and within each rate it is station-to-station or person-to-person.

Do they even have rates like this any more?