I have dataset DS1 which has records say
1
2
3
4
5
...
...
etc
And also I have second dataset DS2 whcih has records
1
3
4
5
6
8
..
...
Both the files are sorted and now I want to compare these files and write it into the third files if the records are matching.
Answer Posted / harsha
Use following JCL
//STEP010 EXEC PGM=ICETOOL
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//FILEIN DD DSN=XXXXXXXXXXXXXX,DISP=SHR
//TOOLIN DD *
SELECT FROM(FILEIN) TO(UNIQFL) -
ON(1,73,CH) NODUPS
SELECT FROM(FILEIN) TO(DUPFL) -
ON(1,73,CH) ALLDUPS
/*
//*
//DUPFL DD SYSOUT=*
//UNIQFL DD SYSOUT=*
//*
Label DUPFL will show all duplicate records
Label UNIQFL will show all unique records
Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is static and dynamic call in cobol?
What is cobol?
What are the different rules to perform a Search?
How do we get current date from system with century in COBOL?
I have a File that has duplicate records. I need only those records that occur more than thrice.?
What is link edit in cobol?
What is difference between static and dynamic call in cobol?
what is amode(24), amode(31), rmode(24) and rmode(any)?
What is a scope terminator give example?
How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?
What is comp-1 and comp-2?
Write a program to explain size error.
How do define dynamic array in cobol. how do you define single dimensional array and multidimensional array in your cobol?
Can a Search can be done on a table with or without Index?
) How do u handle errors in BMS macro