LENFORMAT

Synopsis

HELP:   Format of the length field for open platforms [word]
TYPE:   OVERLAY
SYNTAX: LENFORMAT.{INTEGER()/STRING()/BCD()/HOST()}

Description

The overlay can be used to define the format of the length field on open platforms which don't support record formats by the data management system. For example: If you read records on a mainframe and you want to write the records as records (not as binary or text data) on WINDOWS or UNIX then the data will be prefixed with the record length. The format of this length field can be changed over this union.

This length specification will be only used for variable length records. The default mapping method between record formats will be map each host record format the corresponding open variable format.

If the length format not defined the length field will be written as 32 bit integer in platform dependent byte order. This behavior corresponds to the FILEDATA=RECORD parameter for USS files on z/OS. This means that if you write a record oriented file to USS without any format changed over this overlay then you can read the record with another MVS application using FILEDATA=RECORD.

If you choose record format text or binary then this will correspond to FILEDATA=TEXT or FILEDATA=BINARY and the length format specification will be ignored. To enable record format mapping based on the data type you can set the environment variable below:

   FL_RECORD_FORMAT_MAPPING=DATATYPE

If this environment variable set, then the length format is only used if you explicitly set a variable record format of the open systems.

Since version 5.1.8, FLAM can detect the 4 byte length fields (integer or host) inside a data stream. We recommend to use one of these formats to have more comfort when reading.