Package com.blackhillsoftware.zutil.io


package com.blackhillsoftware.zutil.io
This package provides classes to simplify working with z/OS datasets.

RecordReader and RecordWriter

RecordReader and RecordWriter are wrappers for com.ibm.jzos.RecordReader and com.ibm.jzos.RecordWriter which add the Closeable interface and so can be used with try-with-resources blocks.

This simplifies the code to read/write z/OS datasets. Instead of:

 RecordReader reader = null;
 try 
 {
     reader = RecordReader.newReaderForDD("INPUT");
     // read records
 } 
 finally 
 {
     if (reader != null) 
     {
         reader.close();
     }
 }
 

you can use:

 try (RecordReader reader = RecordReader.newReaderForDD("INPUT"))
 {
    // read records
 }
 
for the same result.

TextRecordReader and TextRecordWriter

TextRecordReader and TextRecordWriter provide the ability to read and write Strings from EBCDIC text datasets.

They attempt to provide similar semantics to reading and writing Strings to a regular file. You can: