|
|
|
|
|
|
|
|
|
|
* |
|
|
IDENTIFICATION |
|
DIVISION. |
|
|
PROGRAM-ID. |
|
T3. |
|
* |
|
|
ENVIRONMENT |
|
DIVISION. |
|
|
CONFIGURATION |
|
SECTION. |
|
|
SOURCE-COMPUTER. |
|
SAMSUNG. |
|
|
OBJECT-COMPUTER. |
|
SAMSUNG. |
|
* |
|
|
DATA |
|
DIVISION. |
|
|
WORKING-STORAGE |
|
SECTION. |
|
* |
|
|
77 |
|
I |
PIC |
99 |
VALUE 0. |
|
|
77 |
|
J |
PIC |
99 |
VALUE 0. |
|
|
01 |
TAB1-ENTRY |
|
VALUE "11223344556677889900". |
|
|
|
03 |
A |
PIC |
99 |
OCCURS 10 TIMES. |
|
|
01 |
TAB2-ENTRY. |
|
|
|
|
|
|
03 |
B |
PIC |
99 |
OCCURS 10 TIMES. |
|
* |
|
|
PROCEDURE |
|
DIVISION. |
|
|
START-RTN. |
|
|
|
|
|
|
|
DISPLAY " " ERASE. |
|
|
|
DISPLAY "MATRIX A " LINE
6 POSITION 1. |
|
|
|
PERFORM DIS1-RTN |
|
|
|
|
|
VARYING I FROM 1 BY 1 UNTIL
I > 10. |
|
|
|
PERFORM MOVE-RTN |
|
|
|
|
|
VARYING I FROM 1 BY 1 UNTIL
I > 10. |
|
|
|
DISPLAY "MATRIX B " LINE
9 POSITION 1. |
|
|
|
PERFORM DIS2-RTN |
|
|
|
|
|
VARYING I FROM 1 BY 1 UNTIL
I > 10. |
|
* |
|
|
|
|
|
|
|
|
END-RTN. |
|
|
|
|
|
|
|
STOP RUN. |
|
|
|
|
|
DIS1-RTN. |
|
|
|
|
|
|
|
DISPLAY A(I) LINE
7 POSITION 0. |
|
|
|
DISPLAY " " LINE
7 POSITION 0. |
|
|
DIS2-RTN. |
|
|
|
|
|
|
|
DISPLAY B(I) LINE 10
POSITION 0. |
|
|
|
DISPLAY " " LINE
10 POSITION 0. |
|
|
MOVE-RTN. |
|
|
|
|
|
|
|
COMPUTE J = 11 - I. |
|
|
|
MOVE A(I) TO B(J). |
|
|
|
|
|
|
|
|
|