RecordOrientedDataSetWriterPattern
RecordOrientedDataSetWriterPattern 패턴을 사용하여 데이터를 z/OS® 데이터 세트에 작성합니다.
클래스 지원
- ZFileStreamOrientedTextWriter: 텍스트 데이터 쓰기
- ZFileStreamOrientedByteWriter: 바이트 데이터 쓰기
- ZFileRecordOrientedDataWriter: 순차 데이터 쓰기
필수 특성
패턴에 다음 특성이 필요합니다.
특성 이름 | 값 | 설명 |
---|---|---|
PATTERN_IMPL_CLASS | Java™ 클래스 이름 | RecordOrientedDatasetWriterPattern 인터페이스를 구현하는 클래스 |
DSNAME | 데이터 세트 이름 | 예를 들어, USER216.BATCH.RECORD.OUTPUT |
선택적 특성
다음 특성은 패턴에 대해 선택사항입니다.
특성 이름 | 값 | 설명 |
---|---|---|
ds_parameters | 데이터 세트를 여는 데 사용된 매개변수입니다. | ZFileRecordOrientedDataWriter의 기본값은 wb,recfm=fb,type=record,lrecl=80이며 ZFileStreamOrientedByteWriter 및 ZFileStreamOrientedTextWriter에 대한 기본값은 wt입니다. |
디버그 | 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>