Encoders

An encoder specifies how data is to be encoded. The syntax for the  encoders  is as follows:

encoder <encoder_name> : <encoder options>; 

The encoder options are:


OptionDescription

out_map(<map name>)

Specifies what out-maps to use. At least one is required.

block_size(<size>)

Specifies that this is a blocked format with a certain block size.

terminated_by(<terminator>)

Specifies the block filler used. This option has no effect if the block_size has not been specified.

When encoding a record, the encoder tries each out-map in the order specified. If the out-map can encode the record, then this out-map is used, otherwise, the next out-map is tried.

An out-map can encode the data if:

  1. The record type matches the internal type specified in the out-map.

  2. All format-specific requirements are met. At the moment this evaluation is performed only for sequential data with an identified_by condition. Only data where the mapped fields meet the identification rule is accepted. This is to support mapping to different external record types from the same internal type.

    Note!

    There is no such thing as a constructed encoder. If the records are required to be forwarded in a specific order, an APL agent handling the output logic must precede the Encoder.