#### BLK

#### Synopsis

    HELP:   Read a file block-oriented (mainly for open world)
    TYPE:   OBJECT
    SYNTAX: BLK(NET.{},NAME/FILE['str'/STREAM/DUMMY...],BLKSIZ=num,DATTYP=NONE/BINARY/RECORD/RECTXT/CHAR/TEXT/XML/TABLE,PRNCTR=DETACH/RETAIN/ERASE/REPLACE,RPLFFD[=num],FRCBLK,ADDDLM,SUBSYS(),REMOVE,PREPRO[()...],POSTPRO/PSTPRO[()...])

#### Description

This object defines the block oriented read operation for files. This method reads block size bytes as one chunk and gives this block simply in binary form to the subsequent conversion layer. This is the most famous and simplest way to read a file. This read method is useful for all non record oriented file formats.

You can also read record oriented data sets. In this case the block size defines how many records are processed in one chunk. If the next complete record too big for this block, it is copied as first record of the next block.

If you read records with FIOBLK there are no capability to store any attributes except the record length. This means that print control character and slot number are lost. Record oriented data sets you can use FIOREC to manage record attributes separately. Print control character can remain in the record oriented data block or detached, but the attribute is lost after the read operation.

You can also enforce block orientation on a record-oriented device, in which case record boundaries are lost and the block is filled byte-wise. This will result in better performance, but a transparent read of different file formats and normal host data sets is not possible anymore. Additionally, you can also add the system delimiter behind each record to produce a valid block for text formatting.

#### Arguments

- `STRING: NAME/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: DATTYP=NONE/BINARY/RECORD/RECTXT/CHAR/TEXT/XML/TABLE - Definition of data type for better handling [NONE]`
  - `NONE - Unknown data type`
  - `BINARY - Binary data (not printable)`
  - `RECORD - Binary record (not printable)`
  - `RECTXT - Text record (printable)`
  - `CHAR - Character data (no delimiter)`
  - `TEXT - Text data (with delimiter)`
  - `XML - XML data (like CHAR)`
  - `TABLE - Table (various elements per record)`
- `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: ADDDLM - Add a delimiter behind each record to produce a text block [FALSE]`