FILE SECTION.

FD  INPUT-FILE
01  INPUT-RECORD.
    05  IN-FIELD-1         PIC X(20).
    05  IN-FIELD-2         PIC X(40).

FD  OUTPUT-FILE
01  OUTPUT-RECORD.
    05  OUT-FIELD-1        PIC X(20).
    05  OUT-FIELD-2        PIC X(40).












PROCEDURE DIVISION.

COOO-PROCESSING.
    MOVE IN-FIELD-1 TO OUT-FIELD-1.
    MOVE IN-FIELD-2 TO OUT-FIELD-2.
    WRITE OUTPUT-RECORD.
    PERFORM X100-READ-INPUT.

XIOO-READ-INPUT.
    READ INPUT-FILE
        AT END MOVE 'N' TO EOF-IND
    END-READ.
FILE SECTION.

FD INPUT-FILE
01  INPUT-RECORD           PIC X(8O).



FD  OUTPUT-FILE
01  OUTPUT-RECORD          PIC X(8O).



WORKING-STORAGE SECTION.

01  WS-INPUT-RECORD.
    05  WS-IN-FIELD-1      PIC X(20) VALUE SPACES.
    05  WS-IN-FIELD-2      PIC X(40) VALUE SPACES.

01  WS-OUTPUT-RECORD.
    05  WS-OUT-FIELD-1     PIC X(20) VALUE SPACES.
    05  WS-OUT-FIELD-2     PIC X(40) VALUE SPACES.


PROCEDURE DIVISION

COOO-PROCESSING.
    MOVE WS-IN-FIELD-1 TO WS-OUT-FIELD-1.
    MOVE WS-IN-FIELD-2 TO WS-OUT-FIELD-2.
    WRITE OUTPUT-RECORD FROM WS-OUTPUT-RECORD.
    PERFORM X100-READ-INPUT.

X1OO-READ-INPUT.
    READ INPUT-FILE INTO WS-INPUT-RECORD
        AT END MOVE 'N' TO EOF-IND.











top of
page

home
page

books
page

links
page

class
work

class
notes

cobol
notes

AS400
page

home
email

work
email



1