Search code examples
javaspring-bootiospring-batchzos

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


Solution

  • 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.