RecordFormatMetaData class

The RecordFormatMetaData makes use of the IBM® Toolbox for Java™ RecordFormat class. It allows you to provide the record format when you set the constructor's parameters or use the get and set methods to access the record format.

The following example shows you how to create a RecordFormatMetaData object:

// Create a RecordFormatMetaData object from a sequential file's record format.
RecordFormat recordFormat = sequentialFile.getRecordFormat();
RecordFormatMetaData metadata = new RecordFormatMetaData(recordFormat);

// Display the file's column names.
int numberOfColumns = metadata.getColumnCount();
for (int column=0; column < numberOfColumns; column++)
{
   System.out.println(metadata.getColumnName(column));
}