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


Implementing batch data stream framework and patterns

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

The batch data stream (BDS) framework pattern interface is a simple Java™ interface for a particular type of data stream into which you an insert business logic. The BDS framework has several supporting classes for each pattern that do most of the mundane tasks related to stream management. The following table shows the patterns that the common batch container provides.

The following main methods exist for the BatchDataStream interface. See the API for the BatchDataStream interface for additional information.

  • void open(): Called by batch jobs to open the BDS
  • void close(): Called by batch jobs to close the BDS
  • void initialize(String ilogicalname, String ijobstepid): Called by batch jobs to initialize the BDS and let it knows its logical name and batch step ID.
  • String externalizeCheckpointInformation(): Called by batch jobs right before a checkpoint to record the current cursor of the BDS
  • void internalizeCheckpointInformation(String chkpointInfo(): Called by batch jobs to inform the BDS of the previously recorded cursor, chkpointInfo. Typically, the positionAtCurrentCheckpoint is called after this call to position the BDS to this cursor.
  • void positionAtCurrentCheckpoint(): Called by batch jobs after calling internalizeCheckpointInformation to position the BDS to the cursor indicated by the chkpointInfo passed in through the internalizeCheckpointInformation call.

The BatchDataStream interface does not have methods for retrieving or writing data. There are no getNextRecord and putNextRecord methods defined on the interface that a batch step calls to read or write to the BDS object. Methods for passing data between the batch step and the BDS object are left up to the implementation of the BDS object. Review the batch samples that are provided to see how to implement batch data streams.

Table 1. Batch data stream patterns
Pattern name Description Supporting classes

JDBCReaderPattern

Used to retrieve data from a database using a JDBC connection.

  • LocalJDBCReader
  • JDBCReader
  • CursorHoldableJDBCReader

JDBCWriterPattern

Used to write data to a database using a JDBC connection.

  • LocalJDBCWriter
  • JDBCWriter
ByteReaderPattern

Used to read byte data from a file.

FileByteReader

ByteWriterPattern

Used to write byte data from a file.

FileByteWriter

FileReaderPattern

Used to read a text file.

TextFileReader

FileWriterPattern

Used to write to a text file.

TextFileWriter

RecordOrientedDatasetReaderPattern

Used to read a z/OS® dataset.

  • ZFileStreamOrientedTextReader
  • ZFileStreamOrientedByteReader
  • ZFileRecordOrientedDataReader
RecordOrientedDatasetWriterPattern

Used to write to a z/OS dataset.

  • ZFileStreamOrientedTextWriter
  • ZFileStreamOrientedByteWriter
  • ZFileRecordOrientedDataReader
JPAReaderPattern

Used to retrieve data from a database using OpenJPA

JPAReader

JPAWriterPattern

Used to write data to a database using a Java Persistence API (JPA) connection.

JPAWriter

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014