z/OS Batch Runtime Planning and User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Interface definition

z/OS Batch Runtime Planning and User's Guide
SA23-1376-00

/**
 * 
 * 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);
	
}

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014