WebSphere Extended Deployment Compute Grid, Version 6.1.1
             Operating Systems: AIX, HP-UX, Linux, Solaris, Windows, z/OS


ByteReaderPattern

This pattern is used to read byte data from a file.

Supporting classes

  • FileByteReader

Required properties

Table 1. Required properties
Property name Value
PATTERN_IMPL_CLASS Class implementing ByteReaderPattern interface
FILENAME Complete path to the input file

Optional properties

Table 2. Optional properties
Property name Value Description

debug

true or false (default is false)

Enables detailed tracing on this batch datastream.

EnablePerformanceMeasurement

true or false (default is false)

Calculates the total time spent in the batch data-streams and the processRecord method, if you are using the GenericXDBatchStep.

EnableDetailedPerformanceMeasurement

true or false (default is false)

Provides a more detailed breakdown of time spent in each method of the batch data-streams.

file.encoding

Encoding of the file.

For example, 8859_1

AppendJobldToFileName

true or false (default is false)

Appends the JobID to the file name before loading the file.

Interface definition

public interface ByteReaderPattern {

	/**
	 * Is called by the framework during Step setup stage
	 * @param props
	 */
	public void initialize(Properties props);
	
	/**
	 * 
	 * @param reader
	 * @throws IOException
	 */
	
	public void processHeader(BufferedInputStream reader) throws IOException;
	
	/**
	 * Get the next record from the input stream
	 * @param reader
	 * @return
	 * @throws IOException
	 */
	public Object fetchRecord(BufferedInputStream reader) throws IOException;
}

xJCL example

<batch-data-streams>
<bds>
<logical-name>inputStream</logical-name>
<props>
<prop name="PATTERN_IMPL_CLASS" value="com.ibm.websphere.batch.samples.tests.bds.EchoReader"/>
<prop name="file.encoding" value="8859_1"/>
<prop name="FILENAME" value="/opt/txlist.txt" />
<prop name="debug" value="true"/>
</props>
<impl-class>com.ibm.websphere.batch.devframework.datastreams.patterns.FileByteReader</impl-class>
</bds>
</batch-data-streams>



Related concepts
Batch data stream framework and patterns
Related tasks
[For z/OS operating system] Using the batch data stream (BDS) framework
Related information
JDBCReaderPattern
JDBCWriterPattern
ByteWriterPattern
FileReaderPattern
FileWriterPattern
RecordOrientedDatasetReaderPattern
RecordOrientedDataSetWriterPattern
JPAReaderPattern
JPAWriterPattern
Reference topic    

Terms of Use | Feedback

Last updated: Oct 30, 2009 1:38:02 PM EDT
http://publib.boulder.ibm.com/infocenter/wxdinfo/v6r1m1/index.jsp?topic=/com.ibm.websphere.gridmgr.doc/info/scheduler/rbtchpttrn3.html