简体   繁体   中英

How to Read/write zOS(Mainframe) flat file using spring batch

I am developing spring batch application that should be executed/triggered on zOS (Mainframe). I have to read/write the flat file in zos as a input file in spring batch and do some processing. do we have some working examples ? does spring batch has the capability of reading direct Mainframe flat files ? If so can you give me some working example. Thanks in advance

Use the ZFile class in the z/OS SDK to read flat files (data sets). There's some useful samples to get your started https://github.com/zsystems/java-samples . It's basically a JNI wrapper over the C/C++ stdio fopen() and friends runtime library functions.

Finally, able to solve the problem with this info. https://jira.spring.io/browse/BATCH-497 As David said we have to ZFile and other classes from jzos provided by IBM. I am able to read the flat file from zos using spring batch.

读取inputstream时可以使用charset cp1047。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM