Search and Merge in Eazytrive

Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Search and Merge in Eazytrive

Postby PNRKISHORE » Tue Jun 15, 2010 7:13 pm


I am having a requirement to Append the FileA with File B Contents if there is a Match in Key where in the File A and the FIle B are sorted with Different variables
File A is a sorted file with DU_ID and the File B is Sorted file with State_Id.

I have achieved the same Using Eazytrive code and a set of sort steps.

a) Sort the File A with fileb key(Say State_ID)
b) wrote a EAZytrive code to merge the Fileb records to File A to make it to have LRECL of 1500 for matched condition and filler for unmathched condition
F) Again sort the Output with the file a key (DU_ID) .

As the volume of Records that has been handled is huge 50 Milliion records in file A and 50 thousand Records in File B.
the job is taking a lot of time to complete its Execution because of Sort Step Prior and After the Eazy trive code.

I cannot use the binary Search feature of the eazytrive as the ARG and DESC variables of the lookup table should not Exceed 254 Length . in my case it is 301.

Kindly Suggest , is there any best way to handle this issue so as to reduce the job Execution time.

Posts: 1
Joined: Tue Jun 15, 2010 6:37 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Search and Merge in Eazytrive

Postby dick scherrer » Tue Jun 15, 2010 11:16 pm

Hello and welcome to the forum,

It is not clear why a binary search would even be considered. . .

Suggest you post a few sample records from both input files (relevant fields only, not the whole record) and show the output you want from those sample input records.

What run time is considered "too long"?
Hope this helps,
User avatar
dick scherrer
Global moderator
Posts: 6269
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Return to IBM Cobol


  • Related topics
    Last post