IDENTIFICATION DIVISION. PROGRAM-ID. tabelle1. ****************************************************************** DATA DIVISION. WORKING-STORAGE SECTION. 77 i-a pic 99. 77 i-b pic 99. 77 summe pic 999. 01. 03 tabelle. 05 occurs 9. 07 occurs 9. 10 elem. 12 elem-a pic 9. 12 elem-b pic 9. 03 tab1 redefines tabelle. 05 occurs 3. 07 elem1 pic 99 occurs 3. 07 pic x(12). 03 tab2 redefines tabelle. 05 occurs 3. 07 pic x(6). 07 elem2 pic 99 occurs 3. 07 pic x(6). 03 tab3 redefines tabelle. 05 occurs 3. 07 pic x(12). 07 elem3 pic 99 occurs 3. 03 tab4 redefines tabelle. 05 pic x(18) occurs 3. 05 occurs 3. 07 elem4 pic 99 occurs 3. 07 pic x(12). 03 tab5 redefines tabelle. 05 pic x(18) occurs 3. 05 occurs 3. 07 pic x(6). 07 elem5 pic 99 occurs 3. 07 pic x(6). 03 tab6 redefines tabelle. 05 pic x(18) occurs 3. 05 occurs 3. 07 pic x(12). 07 elem6 pic 99 occurs 3. 03 tab7 redefines tabelle. 05 pic x(18) occurs 6. 05 occurs 3. 07 elem7 pic 99 occurs 3. 07 pic x(12). 03 tab8 redefines tabelle. 05 pic x(18) occurs 6. 05 occurs 3. 07 pic x(6). 07 elem8 pic 99 occurs 3. 07 pic x(6). 03 tab9 redefines tabelle. 05 pic x(18) occurs 6. 05 occurs 3. 07 pic x(12). 07 elem9 pic 99 occurs 3. ****************************************************************** PROCEDURE DIVISION. s1. * füllen der Tabelle mit Zeilen-/Spalten-Index perform varying i-a from 1 by 1 until i-a > 9 perform varying i-b from 1 by 1 until i-b > 9 move i-a to elem-a(i-a i-b) move i-b to elem-b(i-a i-b) end-perform end-perform * Ausgabe 5.Quadrat perform varying i-a from 1 by 1 until i-a > 3 perform varying i-b from 1 by 1 until i-b > 3 display elem5(i-a i-b) line i-a pos i-b * 2 end-perform end-perform * Ausgabe 8.Quadrat perform varying i-a from 1 by 1 until i-a > 3 perform varying i-b from 1 by 1 until i-b > 3 display elem8(i-a i-b) line i-a + 4 pos i-b * 2 end-perform end-perform * Ausgabe 9.Quadrat perform varying i-a from 1 by 1 until i-a > 3 perform varying i-b from 1 by 1 until i-b > 3 display elem9(i-a i-b) line i-a + 8 pos i-b * 2 end-perform end-perform * Summe 5. Quadrat initialize summe perform varying i-a from 1 by 1 until i-a > 3 perform varying i-b from 1 by 1 until i-b > 3 compute summe = summe + elem5(i-a i-b) end-perform end-perform display summe at 1302 accept omitted. stop run.