我正在尝试使用IBM的JSR352实现开发Java批处理程序.由于批处理作业涉及迭代处理大量记录,因此我选择将其实现为块处理"作业.
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.
此工作涉及3个步骤,对文件1中的每个记录重复进行
This job involves of 3 steps which keeps repeated for each records in File 1
从处理器到编写器,我可以返回所有行号,其中 找到了关键文本匹配项.但是,如果没有对文件的RandomAccess,如何 我可以从Writer中更新文件2中的那些特定行号吗?
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?
由于我只能使用这些输入/输出流 文件处理我无法拆分Lookup&之间的更新逻辑 处理器和作家班.我该如何实现?
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 ?
这是因为代码将在Windows计算机中开发,但最终在大型机(z/os)服务器中执行.
This is because the code will be developed in a windows machine but, finally executed in a mainframe (z/os) server.
推荐答案处理器在技术上是可选的,因此您可以仅在writer类中合并查找/更新逻辑.这可能会有所帮助.
The processor is technically optional, so you could merge the lookup/update logic in just the writer class. That might help.
在z/OS上,使用VSAM数据集(也可以通过JZOS ZFile API进行访问)更容易做到这一点.但这将很难在Windows上进行开发/测试.我想您可以分开ZFile调用,并在Windows上用一些经过装配的仿真代替它们,这些仿真可以很好地用于测试目的.
On z/OS this is easier to do with a VSAM dataset (also accessible via the JZOS ZFile APIs). But that's going to be hard to develop/test on Windows. I suppose you could keep the ZFile calls separate and on Windows replace them with some rigged up emulation that would work well enough for testing purposes.
更多推荐
如何在块处理中实现文件更新逻辑(Java Batch
发布评论