Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

What is an in line perform? When would you use it? Anything else you wish to say about it.

1060


Define cobol?

1373


Name the divisions, which are available in a cobol program?

1216


I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue

2518


how do you reference the ksds vsam file formats from cobol programs

1159


What is the difference between structured cobol programming and object alternativelyiented cobol?

1231


Name some of the examples of COBOl 11?

3124


How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.

4152


what is amode(24), amode(31), rmode(24) and rmode(any)?

1131


How do get the result of your program directly on your pc?

2327


What is inspect in cobol ?

1282


What is the LINKAGE SECTION used in COBOL?

1514


What are the different types of condition in cobol and write their forms.

1098


How many bytes S(8) comp field occupy and its maximum value?

2127


Write down the divisions of cobol program?

1226