write a program to eliminate duplicate records in a input file
and send them to output file.
Answers were Sorted based on User's Feedback
Answer / naidu sekhar yandrapu
We can use JCL SORT utility using SYSIN DD * SUM fields =
none, will eliminate duplicate and store in a different dataset.
e.g
//SORTXSUM DD DSN=... Output eliminated by the SUM stm
//SYSIN DD *
SORT FIELDS=(1,3,CH,A)
SUM FIELDS=NONE , XSUM
/*
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / ehatesham
//SORTXSUM DD DSN=datasetname,
// DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
// SPACE=(CYL,(1,4),RLSE),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=800)
.
.
//SYSIN DD *
SORT FIELDS=(1,3,CH,A)
SUM FIELDS=NONE,XSUM
/*
| Is This Answer Correct ? | 0 Yes | 0 No |
01 WS-NAME PIC X(10) OCCURES 2. by this we can get ws-name 2 times. My qustion is how can we access the second name
i have variable record in the 5th, i want to sort from 5th filed ? how ?
Which is the best IBM mainframe Training Institute in Ameerpet, Hyderabad
I have a File that has duplicate records. I need only those records that occur more than thrice.?
describe 805 error
What is the use of EVALUATE statement?
Write some characteristics of cobol as means of business language.
What will happen if we try to create GDG (+2) generaton instead of (+1) generation?
If I want to increase the Limit in GDG. What should I do?
What is the difference between perform … with test after and perform … with test before?
Study the DATA DIVISION entries and the three PROCEDURE DIVISION entries given below: 01 END-OF-FILE-SWITCH PIC XXX. 88 NO-MORE-RECS VALUE "YES". 88 MORE-RECS VALUE "NO". (i) READ SAMPLE-FILE AT END MOVE "YES" TO NO-MORE-RECS. (ii) IF NO-MORE-RECS = "YES" GO TO LAST-PARA. (iii) IF NO-MORE-RECS GO TO LAST-PARA. Which are wrong? (a) (i) and (ii) (b) (ii) and (iii) (c) (i) and (iii) (d) all
For rewrite, why is it mandatory that file needs to be opened?