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
Is it possible to define dd statements as you want?
What is Cataloged Procedures?
Can we use DISP=SHR in output file in JCL
Explain the purpose of the dd keylen parameter?
What happens if both JOBLIB & STEPLIB is specified ?
How can a jobs execution priority be modified?
What is the significance of addrspc parameter in exec statement?
Give the syntax of job specifying jcl statement.
Can an individual step be restricted from using all the jobs allowed cpu time?
WORKING-STORAGE SECTION. 01 GROSS-PAY. 05 BASIC-PAY PIC 9(5). 05 ALLOWENCES PIC 9(3). PROCEDURE DIVISION. MOVE 1000 TO BASIC-PAY. MOVE 250 TO ALLOWENCES. DISPLAY GROSS-PAY. STOP RUN. 77 W-A PIC 9(3)V99 VALUE 23.75 77 W-B PIC ZZ9V99 VLAUE 123.45 after the statement MOVE W-A TO W-B what will be W-B's value? a.123.75 b.b23.75 (where b indicates space) c.023.75 d.invalid move
What is the function of the dd mgmtclas keyword in sms datasets?
How to resolve the error "WER488A JOIN CAPACITY EXCEEDED" I am using SYNCSORT with JOINKEYS to compare 2 files. I am Getting error - > WER488A JOIN CAPACITY EXCEEDED There are 2 files to be compared with about 2 million records each. LRECL is 3665. Can somebody give a pointer as to how to resolve this problem? I am using SYNCSORT with JOINKEYS to compare 2 files. I am Getting error - > WER488A JOIN CAPACITY EXCEEDED There are 2 files to be compared with about 2 million records each. LRECL is 3665. Can somebody give a pointer as to how to resolve this problem?
I had Records in file Like this Company Code IBM 2 IBM 1 IBM 4 WIPRO 3 WIPRO 2 WIPRO 9 TCS 4 TCS 6 TCS 3 i want the record of every company with highest code How can i do that?
Name the parameters which can be used to limit the number of records written to a sysout dataset?
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