#### BINARY

#### Synopsis

    HELP:   Read binary data from a file
    TYPE:   OBJECT
    SYNTAX: BINARY(NET.{},FILE['str'/STREAM/DUMMY...],BLKSIZE=num,RECLENGTH=num,DECODE[=NONE/ARCHIVE/FIODEC/DECRYP/CRYDEC/DECOMP/CMPDEC/ALWAYS],DECRYPT[{}...],FDECODE/COD.{},RLDECO,RECDELIM='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,SUPPADDING,PRNCONTROL=DETACH/RETAIN/ERASE/REPLACE,RPLFFD[=num],SUBSYSTEM(),FRCBLK,REMOVE,PLATFORM=WIN/UNX/ZOS/USS/VSE/BS2/MAC,OWNER='str',ENVID='str',HASH(),SIGNATURE.{},CHECK,TABLE(),AVSCAN(),NOARCH,PREPROCESS[()...],POSTPROCESS/PSTPRO[()...])

#### Description

Read binary operates on blocks of binary data. By default, no decompression or any other conversions are performed. These must explicitly be turned on using the respective parameters.

If the 'decode' parameter is set, the data is automatically decrypted and uncompressed. If the encrypted or compressed data is encoded (e.g. Base64), it is decoded before uncompression/decryption. If a 4 byte record length format detected and decoding should be done, then the records are parsed before the next decoding step. If the uncompressed/decrypted data is encoded, it is only decoded if 'decode' is set to 'CMPDEC' or 'ALWAYS'. By setting 'decode' to one of the available values, you have further control over the enabled automatisms.

If you provide a record length, the data stream is wrapped into fixed- length binary records. This is useful to exchange fixed-length records with open standards like PGP or GZIP.

If you provide a binary delimiter, the data stream is wrapped into variable-length binary records.

If you provide row specifications through the table object, the binary blob is split into neutral FL5 table elements (rows and columns).

Binary data blocks are the simplest form of data type handled by FLAM. Binary data can only be accessed by byte offset. The structure of the data is unknown to FLAM.

Using only binary blocks with FLAM mainly equals the behavior and abilities of other encryption and compression tools. You may want to try one of the other available read methods to read structured data.

#### Arguments

- `STRING: FILE['str'/STREAM/DUMMY...] - Name/URL of file to read [''==stdin]`
  - `STREAM - Read from stdin or write to stdout`
  - `DUMMY - Read EOF or write nothing`
- `NUMBER: RECLENGTH=num - Length to activate fixed length record wrapping [0-OFF]`
- `NUMBER: DECODE=NONE/ARCHIVE/FIODEC/DECRYP/CRYDEC/DECOMP/CMPDEC/ALWAYS - Decode encoded, encrypted or compressed data [0=NONE]`
  - `NONE - No automated decoding`
  - `ARCHIVE - Transparently read archives`
  - `FIODEC - Base decoding after file IO, before decryption`
  - `DECRYP - Decryption of encrypted data`
  - `CRYDEC - Base decoding after decryption, before decompression`
  - `DECOMP - Decompression of compressed data`
  - `CMPDEC - Base decoding after decompression, before formatting`
  - `ALWAYS - Always decode encoded data (causes the same as DECOMP)`
- `SWITCH: RLDECO - Activate additional record length decoding [FALSE]`
- `STRING: RECDELIM='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 - Delimiter used to parse end of record [NONE]`
  - `CR-ASCII - Delimiter: carriage return in ASCII (0x0D)`
  - `LF-ASCII - Delimiter: line feed in ASCII (0x0A)`
  - `NL-ASCII - Delimiter: new line in ASCII (0x85)`
  - `CRLF-ASCII - Delimiter: carriage return line feed in ASCII (0x0D0A)`
  - `CR-EBCDIC - Delimiter: carriage return in EBCDIC (0x0D)`
  - `LF-EBCDIC - Delimiter: line feed in EBCDIC (0x25)`
  - `NL-EBCDIC - Delimiter: new line in EBCDIC (0x15)`
  - `CRLF-EBCDIC - Delimiter: carriage return line feed in EBCDIC (0x0D25)`
  - `CR-UTF08 - Delimiter: carriage return in UTF-8 (0x0D)`
  - `LF-UTF08 - Delimiter: line feed in UTF-8 (0x0A)`
  - `NL-UTF08 - Delimiter: new line in UTF-8 (0xC285)`
  - `CRLF-UTF08 - Delimiter: carriage return line feed in UTF-8 (0x0D0A)`
  - `CR-UTF16BE - Delimiter: carriage return in UTF-16BE (0x000D)`
  - `LF-UTF16BE - Delimiter: line feed in UTF-16BE (0x000A)`
  - `NL-UTF16BE - Delimiter: new line in UTF-16BE (0x0085)`
  - `CRLF-UTF16BE - Delimiter: carriage return line feed in UTF-16BE (0x000D000A)`
  - `CR-UTF16LE - Delimiter: carriage return in UTF-16LE (0x0D00)`
  - `LF-UTF16LE - Delimiter: line feed in UTF-16LE (0x0A00)`
  - `NL-UTF16LE - Delimiter: new line in UTF-16LE (0x8500)`
  - `CRLF-UTF16LE - Delimiter: carriage return line feed in UTF-16LE (0x0D000A00)`
  - `CR-UTF32BE - Delimiter: carriage return in UTF-32BE (0x0000000D)`
  - `LF-UTF32BE - Delimiter: line feed in UTF-32BE (0x0000000A)`
  - `NL-UTF32BE - Delimiter: new line in UTF-32BE (0x00000085)`
  - `CRLF-UTF32BE - Delimiter: carriage return line feed in UTF-32BE (0x0000000D0000000A)`
  - `CR-UTF32LE - Delimiter: carriage return in UTF-32LE (0x0D000000)`
  - `LF-UTF32LE - Delimiter: line feed in UTF-32LE (0x0A000000)`
  - `NL-UTF32LE - Delimiter: new line in UTF-32LE (0x85000000)`
  - `CRLF-UTF32LE - Delimiter: carriage return line feed in UTF-32LE (0x0D0000000A000000)`
- `SWITCH: SUPPADDING - Suppress trailing padding/equal characters`
- `NUMBER: RPLFFD=num - Replace form feeds, filling rest of page with empty records assuming n lines per page [60]`
- `SWITCH: FRCBLK - Enforce block orientation on record oriented devices [FALSE]`
- `SWITCH: NOARCH - Disable the attempt to read archives (prevent multiple opens to the same file) [FALSE]`