How can duplicates be removed from a file using COBOL?
Finally it worked. Here is the code: IDENTIFICATION DIVISION. PROGRAM-ID.RemoveDup2. ENVIRONMENT DIVISION. INPUT-OUTPUT SECTION. FILE-CONTROL. SELECT INPUTFILEDUP ASSIGN TO ‘C:\Cobol\INPUTFILEDUP.txt’ ORGANIZATION IS LINE SEQUENTIAL. SELECT OUTFILEDUP ASSIGN TO ‘C:\Cobol\OUTFILEDUP.txt’ ORGANIZATION IS LINE SEQUENTIAL. SELECT WorkFile ASSIGN TO “WORK.TMP”. DATA DIVISION. FILE SECTION. FD INPUTFILEDUP. 01 INPUTFILEDUPREC. 88 EOFINPUTFILEDUP VALUE HIGH-VALUES. 02 INPUTFILEID PIC 9(07). FD … Read more