|
|
|
|
|
|
|
|
|
|
* |
|
|
IDENTIFICATION |
|
DIVISION. |
|
|
PROGRAM-ID. |
|
T11. |
|
* |
|
|
ENVIRONMENT |
|
DIVISION. |
|
|
CONFIGURATION |
|
SECTION. |
|
|
SOURCE-COMPUTER. |
|
SAMSUNG. |
|
|
OBJECT-COMPUTER. |
|
SAMSUNG. |
|
* |
|
|
INPUT-OUTPUT |
|
SECTION. |
|
|
FILE-CONTROL. |
|
|
|
|
|
SELECT IN-FILE
ASSIGN TO INPUT "T11.DAT". |
|
|
|
SELECT OUT-FILE ASSIGN TO
OUTPUT "T11.OUT" |
|
|
|
|
ORGANIZATION IS BINARY
SEQUENTIAL. |
|
* |
|
|
|
|
|
|
|
|
DATA |
|
DIVISION. |
|
|
FILE |
|
SECTION. |
|
* |
|
|
FD |
|
IN-FILE LABEL
RECORD IS STANDARD. |
|
|
01 |
|
IN-REC. |
|
|
|
|
|
03 |
ID-1 |
PIC |
9(3). |
|
|
|
03 |
NAME |
PIC |
X(15). |
|
|
|
03 |
KOR |
PIC |
9(3). |
|
|
|
03 |
ENG |
PIC |
9(3). |
|
|
|
03 |
MAT |
PIC |
9(3). |
|
|
FD |
|
OUT-FILE LABEL RECORD
IS STANDARD. |
|
|
01 |
|
OUT-REC. |
|
|
|
|
|
03 |
O-ID |
PIC |
9(3). |
|
|
|
03 |
O-NAME |
PIC |
X(15). |
|
|
|
03 |
O-KOR |
PIC |
9(3). |
|
|
|
03 |
O-ENG |
PIC |
9(3). |
|
|
|
03 |
O-MAT |
PIC |
9(3). |
|
* |
|
|
PROCEDURE |
|
DIVISION. |
|
|
START-RTN. |
|
|
|
|
|
|
|
OPEN |
INPUT |
IN-FILE |
|
|
|
|
|
OUTPUT |
OUT-FILE. |
|
|
READ-RTN. |
|
|
|
|
|
|
|
READ IN-FILE
AT END GO TO END-RTN. |
|
|
|
WRITE OUT-REC FROM
IN-REC. |
|
|
|
GO TO READ-RTN. |
|
|
END-RTN. |
|
|
|
|
|
|
|
CLOSE IN-FILE OUT-FILE. |
|
|
|
STOP RUN. |
|
|
|
|
|
|
|
|
|