block

block adds a blocking indicator to the beginning of record blocks in a print stream. All records in the print stream must have record length indicators. Use block when you need record blocking in a print stream (for example, when you have used unblock prior to running EngageOne™ Enrichment and need blocking to print). To use block to support the IBM record and block prefix, specify –e=I as a command line parameter. Do not specify –b, -i or -p.

Note: All UNIX/Linux utility names must be lowercase.

Syntax

block [-b= -e= -h -i –p=] inputfile outputfile

Parameter Description Default
-b= The maximum blocking size. Records will be accumulated sequentially into blocks, and no block will exceed the maximum blocking size. Processing will terminate if any record exceeds the maximum blocking size. Each record will be blocked.
-e= The byte order in both the blocking length and record length indicator, as follows:
  • B — The length indicator is coded with the most significant byte first. This is commonly called Big Endian.
  • L — The length indicator is coded with the least significant byte first. This is commonly called Little Endian.
  • N — Numeric
  • I — IBM
L
-h Displays help for the utility.
-i The blocking indicator includes its own length and the length of the block of records. If you do not use -i, the blocking indicator includes only the length of the block of records.
-p= The length of both the blocking indicator and record length indicator, as follows:
  • 2 — A two-byte length is used for record length indicators and will also be used for blocking length indicators.
  • 4 — A four-byte length is used for record length indicators and will also be used for blocking length indicators.
2
inputfile The name of the input file.
outputfile The name of the output file.

Example

block -e=L -p=4 -i p2pef.in p2pef.out

In this example, block is to add four-byte blocking indicators to groups of records in the input p2pef.in. The blocking indicators will include their own length and are coded least significant byte first.