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>

トピックのタイプを示すアイコン 参照トピック



タイム・スタンプ・アイコン 最終更新: last_date
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=rgrid_btchpttrn8
ファイル名:rgrid_btchpttrn8.html