myvision69
Programmer
I need to extract data from a Cobol program ans I have both the DTA and KEY files.
Is there a way to convert the data into text file format?
BIG THANKS
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
SELECT Z220-FILE ASSIGN 'C:\Z220.DOC'
ORGANIZATION LINE SEQUENTIAL
ACCESS SEQUENTIAL
FILE STATUS WW-FILE-STATUS.
FD Z220-FILE.
01 Z220-RECORD.
03 FILLER PIC X(01).
03 Z220-EMPLOYEE-NAME PIC X(30).
03 FILLER PIC X(01).
03 Z220-SALARY PIC 9(6).99.
03 FILLER PIC X(01).
FD I220-FILE
01 I220-RECORD.
03 I220-EMPLOYEE-NAME PIC X(30).
03 I220-SALARY PIC 9(6)V99 COMP-3.
READ I220-FILE NEXT RECORD.
AT END
MOVE 'Y' TO WF-EOF-I220
END-READ.
IF WF-EOF-I220 NOT = 'Y'
MOVE ALL '=' TO Z220-RECORD
MOVE I220-EMPLOYEE-NAME TO Z-EMPLOYEE-NAME
MOVE I220-SALARY TO Z-SALARY
WRITE Z220-RECORD
END-IF.