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...

In file1 have 80 records are like d1,d2,d3......D80. File2 have 1000records are like a1d1,a1d2,a3d3.....Etc. I want matching records in file3 ? Plse tell me the matching logic???I want answer only in cobol ?Not using any tool or jcl?

Answer Posted / animesh

It can be done using internal array table within the cobol program. first we will Move Record file in an aray with same Lrecl as the file1 and having 80 occurence.
Then again for file 2 we will populate another internal array table with 1000 occurence.

perform varying w-v-idx1 from w-k-1 by w-k-1 until
w-v-idx1> 80

perform varying w-v-idx2 from w-k-1 by w-k-1 until
w-v-idx2>1000

If w-v-file1(w-v-idx1) = w-v-file2(idx2)
Set some w-s-count = y
Add +1 to w-s-count

move -w-v-file1(w-v-idx1) to w-v-file3
write file 3 from w-v-file

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I have a File that has duplicate records. I need only those records that occur more than thrice.?

9742


Can we change the password using ALTER? anyone tried and changed?

1950


How you can characterize tables in cobol?

1147


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

1465


Have you used comp and comp-3 in your project? And how?

2424


Write a program to explain size error.

1136


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

1315


Can a Search can be done on a table with or without Index?

1233


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

2414


What are INPUT PROCEDURE and OUTPUT PROCEDURE?

1221


What is the LINKAGE SECTION used in COBOL?

1467


how can i see junk values in dclgen or in hostvariable of comp ?

2932


Write the code implementing the perform … varying.

1012


What type of SDLC u followed? Why?

1956


What are the different rules for performing sort operation?

1155