WebSphere Extended Deployment Compute Grid, Version 6.1.1
             オペレーティング・システム: AIX , HP-UX, Linux, Solaris, Windows,


RecordOrientedDataSetWriterPattern

RecordOrientedDataSetWriterPattern パターンは、z/OS® データ・セットにデータを書き込む場合に使用されます。

サポート・クラス

  • ZFileStreamOrientedTextWriter: テキスト・データを書き込みます。
  • ZFileStreamOrientedByteWriter: バイト・データを書き込みます。
  • ZFileRecordOrientedDataWriter: 順次データを書き込みます。

必須プロパティー

表 1. 必須プロパティー
プロパティー名 説明
PATTERN_IMPL_CLASS

Java™ クラス名

RecordOrientedDatasetWriterPattern インターフェースを実装するクラス

DSNAME

データ・セット名

例) USER216.BATCH.RECORD.OUTPUT

オプションのプロパティー

表 2. オプションのプロパティー
プロパティー名 説明
ds_parameters

データ・セットのオープンに使用されるパラメーター。

ZFileRecordOrientedDataWriter のデフォルトは、 「wb,recfm=fb,type=record,lrecl=80

および

ZFileStreamOrientedByteWriter、ZFileStreamOrientedTextWriter の デフォルトは、

wt」です。

debug

true または false (デフォルトは false)

このバッチ・データ・ストリームに対する詳細トレースを使用可能にします。

EnablePerformanceMeasurement

true または false (デフォルトは false)

GenericXDBatchStep を使用している場合に、バッチ・データ・ストリームおよび processRecord メソッドにかかった合計時間を計算します。

EnableDetailedPerformanceMeasurement

true または false (デフォルトは false)

バッチ・データ・ストリームの各メソッドにかかった時間の詳細を提供します。

file.encoding

ファイルのエンコード。

例) CP1047

インターフェース定義

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

xJCL の例

<batch-data-streams>
<bds>
<logical-name>outputStream</logical-name>
<props>
<prop name="PATTERN_IMPL_CLASS" value="com.ibm.websphere.batch.samples.tests.bds.EchoWriter"/>
<prop name="DSNAME" value="USER216.BATCH.RECORD.OUTPUT"/>
<prop name="ds_parameters" value="wt"/>
<prop name="file.encoding" value="CP1047"/>
<prop name="debug" value="${debug}"/>
</props>
<impl-class>com.ibm.websphere.batch.devframework.datastreams.patterns.ZFileStreamOrientedByteWriter</impl-class>
</bds>
</batch-data-streams>	        



関連概念
バッチ・データ・ストリームのフレームワークとパターン
関連情報
JDBCReaderPattern
JDBCWriterPattern
ByteWriterPattern
FileReaderPattern
FileWriterPattern
RecordOrientedDatasetReaderPattern
JPAReaderPattern
参照トピック    

ご利用条件 | フィードバック

最終更新: 2009/09/17 16時38分56秒EDT
http://publib.boulder.ibm.com/infocenter/wxdinfo/v6r1m1/index.jsp?topic=/com.ibm.websphere.gridmgr.doc/info/scheduler/rbtchpttrn8.html