I am trying to develop a Java batch program using the IBM's JSR352 Implementation. Since the batch job involves iteratively processing huge number of records, I chose to implement it as Chunk Processing job.
This job involves of 3 steps which keeps repeated for each records in File 1
- Reader Class: Read content from File 1 to form a key text
- Processor Class: Look-up the Key text in File 2
- Writer Class: Update the text in File 2 where key text was found with a custom text
From the processor to writer, I can return all line numbers where the key text matches were found. But, without RandomAccess to file, how can i update those specific line numbers in File 2 from my Writer?
Since I am restricted to use only these Input/Outputstreams for file handling I am unable to split the Lookup & Update logic between processor & writer classes. How can i achieve this ?
This is because the code will be developed in a windows machine but, finally executed in a mainframe (z/os) server.