Modernization Hub

FCB - File Control Block / Forms Control Buffer

Enhanced Definition

FCB is an acronym with two distinct meanings in the mainframe and z/OS environment: **File Control Block** and **Forms Control Buffer**. A **File Control Block** is an internal data structure used by access methods to manage the attributes and state of an open data set. A **Forms Control Buffer** is a mechanism used by z/OS to control the formatting and page layout for line printers, particularly for impact printers, by defining channel skips and line spacing.

Key Characteristics

    • File Control Block (FCB):
    • An in-memory control block, often an extension of or pointed to by the DCB (Data Control Block), containing dynamic information about an open file.
    • Created and initialized by the operating system during the OPEN processing of a data set.
    • Contains information such as current record position, buffer addresses, and various flags indicating file status.
    • Used internally by access methods (e.g., QSAM, BSAM, VSAM) to perform I/O operations efficiently.
    • Forms Control Buffer (FCB):
    • A set of instructions loaded into a printer or printer controller (e.g., IBM 3800 series) to define vertical formatting.
    • Replaces the need for physical forms overlays or manual adjustment for common report layouts.
    • Typically defined using ASA (American National Standards Institute) or MACHINE control characters to specify actions like channel skips, line feeds, and page ejects.
    • Managed by the PRMOD utility or specified via the FCB parameter on a JCL DD statement for SYSOUT data sets.

Use Cases

    • File Control Block (FCB):
    • Internal management of data set access by COBOL programs when performing READ or WRITE operations on files defined with SELECT statements.
    • Operating system's tracking of file attributes and current I/O status for sequential or indexed files.
    • Facilitating efficient data transfer between application buffers and disk storage by access methods.
    • Forms Control Buffer (FCB):
    • Printing multi-page reports where specific lines need to align with pre-printed forms (e.g., invoices, checks).
    • Automating page breaks and top-of-form positioning for standard reports without requiring explicit programming logic for every line.
    • Controlling the vertical spacing (e.g., single, double spacing) and channel skipping to specific lines on a page.

Related Concepts

The File Control Block is closely related to the DCB (Data Control Block), which defines the static attributes of a data set. While the DCB is primarily defined by JCL DD parameters, the FCB holds the dynamic, runtime state of the file. Both are essential for access methods to manage data set I/O. The Forms Control Buffer is specified via the FCB parameter on a JCL DD statement for SYSOUT data sets, linking it directly to output management and printer hardware configuration. It works in conjunction with ASA control characters embedded in the print data stream to achieve precise report formatting.

Best Practices:
  • File Control Block (FCB):
  • Ensure DCB parameters in JCL DD statements accurately reflect the data set's characteristics to allow the operating system to build a correct FCB.
  • Avoid direct manipulation of FCBs; rely on standard access methods and OPEN/CLOSE processing.
  • Properly close all files in application programs to ensure FCBs are deallocated and data integrity is maintained.
  • Forms Control Buffer (FCB):
  • Define FCBs carefully using the PRMOD utility to match the exact requirements of the pre-printed forms or desired report layout.
  • Always specify the correct FCB name in the JCL DD statement's FCB parameter (e.g., FCB=MYFCB) when printing to ensure the correct formatting is applied.
  • Test FCB definitions thoroughly with actual print jobs to verify alignment and page breaks before production use.
  • For modern output requirements, consider using AFP (Advanced Function Presentation) or converting to PDF for more flexible and device-independent document formatting, while acknowledging FCB's continued role in legacy systems.

Related Vendors

ADPAC Corporation

5 products

Tone Software

14 products

IBM

646 products

Applied Software

7 products

Trax Softworks

3 products

Related Categories

Operating System

154 products

Tools and Utilities

519 products

Automation

222 products

Encryption

41 products

Files and Datasets

168 products