BLK

Synopsis

HELP:   Format all elements to one block of data (all meta data lost)
TYPE:   OBJECT
SYNTAX: BLK(METHOD=L4I/L4X/B4I/B4X/S4I/S4X/HLI/HLX/HBI/HBX/HSI/HSX/DLM,RECDLM='bin'/CR-ASCII/LF-ASCII/NL-ASCII/CRLF-ASCII/CR-EBCDIC/LF-EBCDIC/NL-EBCDIC/CRLF-EBCDIC/CR-UTF08/LF-UTF08/NL-UTF08/CRLF-UTF08/CR-UTF16BE/LF-UTF16BE/NL-UTF16BE/CRLF-UTF16BE/CR-UTF16LE/LF-UTF16LE/NL-UTF16LE/CRLF-UTF16LE/CR-UTF32BE/LF-UTF32BE/NL-UTF32BE/CRLF-UTF32BE/CR-UTF32LE/LF-UTF32LE/NL-UTF32LE/CRLF-UTF32LE,SUPPAd,PUTATR,BUFSIZ=num)

Description

By default (i.e. no method provided), the object "format block" simply concatenates the data of each element to one block of data. Through the method parameter, you can format blocks of data with 4 byte length fields in front of or a binary delimiter at the end of the element data. For example, if you provide a length method (METHOD) and a record delimiter (RECDLM), then a length field is written in front of the record and the delimiter at the end. Be aware that the result can be parsed only in 2 steps (e.g. cnv.rec() followed by fmt.rec()).

All attributes and additional element information is lost unless the PUTATR switch is activated. In this case, the attributes (slot number of RRDS, ASA or MCC) are written in front of each record.

If a length field is added for each element, the data will be organized as binary blocks and it is not possible, for example, to do character conversion or other text oriented things anymore.

With FMT.REC() length field formats or binary delimiters can be defined or detected and, if required, previously written attributes can be parsed.

Arguments