But this will again be a Linear search right..? Say I have 400000 records in file A and 9000000 in File B. I have to process 400000 * 9000000 times:(
-----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Donald Johnson Sent: Friday, July 02, 2010 6:58 PM To: [email protected] Subject: Re: Query in Sort In EZT, you could do a two-file match and use logic like this: If Matched unload selection Turn on need-children switch Write output record from unload Else if unload and need-children write output record from unload Else turn off need-children switch end-if end-if This is "out of head" coding, so will need some tweaking... If you need more specifics, let me know and I can dig up one of my two-file match programs from a while ago. * Don * On Thu, Jul 1, 2010 at 10:19 PM, RAMBALAJI S <[email protected]>wrote: > Hi All, > > > > > My input files are as follows > > > > File1 --> IMS DB unload - Sequential file having Parent and child > combination > > > > SEGMENT1 RAM12345 --> Numeric after name is the key--> 12345 Position - > 12 Length --> 5 > > SEGMENT2 .. > > SEGMENT3.. > > SEGMENT4.. > > SEGMENT5.. > > SEGMENT6. . > > > SEGMENT1 BAL23456 > > SEGMENT2 .. > > SEGMENT3.. > > SEGMENT4.. > > SEGMENT5.. > > SEGMENT6. . > : > > : > > > SEGMENT1 MAM34567 > > SEGMENT2 .. > > SEGMENT3.. > > SEGMENT4.. > > SEGMENT5.. > > SEGMENT6. . > > > > File2 - Normal segential file --> position to be compared --> 1 length -->5 > > 12345 > > 45678 > > > > > Output required > > > > > SEGMENT1 RAM12345 > > SEGMENT2 .. > > SEGMENT3.. > > SEGMENT4.. > > SEGMENT5.. > > SEGMENT6. . > > > > My Requirement is, I have to match the two files with the position > mentioned below > > Say File1 --> 12th position of length 5 --> this is present in SEGMENT1 > alone > > File2 --> 1st position of length 5 > > > > IF Compared Key in Segment1 of file1 matches with the file2 below child > segments also needs to be written in out file. Segments are repetetive (Say > we can have 5 Segment2 or 1 or it maynot have the segment2 also) and > segment1 is not in sorted order. If I sort the child segments gets messed > up. Iam not able to perform linear sort since record size is huge. > > > > Hope Iam clear. Any one has a suggestion on finding a suitable logic. > > Iam fine with COBOL/SYNCSORT/EASYTRIEVE > > Regards, > Ram Balaji. > > _________________________________________________________________ > Bollywood, beauties and the latest flicks on MSN entertainment > http://entertainment.in.msn.com/ > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: GET IBM-MAIN INFO > Search the archives at http://bama.ua.edu/archives/ibm-main.html > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html __________ Information from ESET Smart Security, version of virus signature database 5246 (20100702) __________ The message was checked by ESET Smart Security. http://www.eset.com __________ Information from ESET Smart Security, version of virus signature database 5246 (20100702) __________ The message was checked by ESET Smart Security. http://www.eset.com ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

