/**
*
* This pattern is used to write data to z/OS dataset using
* jzos apis
*/
public interface RecordOrientedDatasetWriterPattern {
/**
* This method is called during the job setup phase allowing
* the user to do initialization.
* The properties are the ones passed in the xJCL
* @param props
*/
public void initialize(Properties props);
/**
* This method should be used to write the given
* object into the dataset
* @param out
* @param record
* @throws IOException
*/
public void writeRecord(ZFile out, Object record) throws IOException;
/**
* This method should be used to write header information
* if any
* @param out
* @throws IOException
*/
public void writeHeader(ZFile out) throws IOException;
/**
* This method can be optionally called during process step to explicity
* initialize and write the header.
* @param header
*/
public void writeHeader(ZFile out, Object header);
}