TRESA wrote:i want to search an item number in sequential file with item number from vsam file. If a match is found i'll be writing the record to output file. For the first record the sequential file will be searched till EOF but for the second record i cant set the pointer to the start of the seq file. i can use a table for searching but then i need to know the size of the input seq file. any other option?
Searched to EOF even if you have already found a match?
Like I said before CLOSE & OPEN, you are back at the begining.
Another option is to use a (external or internal) sort and get the sequential file sorted to the same sequence as the VSAM file, that way you will only need one pass through the seqential file.