Hi,

I have a requirement

File A : I have 6 records out of which 4 are same.

File B: I have 8 records out of 6 records are same.

The 4 records in FILEA and 6 records in FILE B are same. If
we substract we will get two records, I need these two
records in output file


This is because to remove the duplicates from the database.

Through easytrieve we can compare but for that there should
not duplicates, but in my file I have duplicates.

Thanks in advance!!

Answer Posted / vijay

It is simple, you no need to code ezt pgm for eliminating
the duplicate records. Try these 2 steps to eliminate the
duplicates.

Step-1: Use sort on file 1 and use sumfields=none on the
key field, then you can get only 2 records in the output
file.

Step-1: Follow the above procedure for the file 2.

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the function of the dd dcb keyword?

696


I have mainpgm(abc) this is the only cobol pgm(non-db2).And this pgm calling subpgm name "acd" this also only cobol(non- Db)and this pgm calling some other subpgm this pgm has cobol-db2 pgm. 1) IF you calling static mode how to run and how to compile? 2) IF you calling dynamic mode how to run and how to compile? plz suggestion me.

1947


Brief description of inline procedure of jcl.

682


how can a gdg base be created in a jcl. What is the difference between empty and scratch parameter while defining/altering gdg base?

778


Which dd parameters are required?

686






I HAVE A VB BLOCK WHICH IS USED AS INPUT IN COBOL CONATINING SOME RECORDS CAN I CHANGE THE FILE FROM VB TO FB?

2097


how to compare two datasets without using superce because output is limited to 133 bytes

1478


how can the same proc be re-used and called by many jobs?

905


what is “Cond= even” and “Cond=only”?

737


have in 100 records in a file i want to read first 3 records and skip next 3 records and agan i want to read 3 records and again i want to skip 3 records... run a loop from record one to 10 evaluate i/3 if comes even then skip else write to output file

923


What parameters can be used to limit the number of records written to a sysout dataset?

746


what are the types of abends that occur on job failure? And explain the possible causes of these

1114


write a jcl to execute a job by 7:00 am on jan 20,1986?

697


How to find the UNIT and VOLUME of a (a) KEPT (b) UNCATALOGED and (c) CATALOGED dataset - using (i) JCL and using (ii) ISPF ?

2168


How can a jobs execution priority be modified?

795