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


Please Help Members By Posting Answers For Below Questions

i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this

984


How to know whether the module is dynamical or statistical?

644


What happens when we move a comp-3 field to an edited (say z (9). Zz-)?

760


How you can characterize tables in cobol?

703


What is a scope terminator give example?

643






How to use the same COBOL program in Batch and CICS on lines? explain with an example

1902


how to convert the recors form vsam file to db2 table tru file aid

2741


If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly

2647


Write down the divisions of cobol program?

658


what is difference between cobol and cobol/400

21534


What is comp-1 and comp-2?

748


Explain how to differentiate call by context by comparing it to other calls?

673


here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?

6776


i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com

1755


What is the use of intialize verb?

733