Modernization Hub

Discard - Throwing away

Enhanced Definition

In the context of mainframe and z/OS systems, "discarding" refers to the deliberate act of ignoring, releasing, or removing data, messages, or resources without further processing or saving them. This action is typically performed to manage system resources, handle errors, or filter out irrelevant information.

Key Characteristics

    • Intentional Act: Discarding is a conscious decision made by an application program or system component, not an accidental loss.
    • Resource Management: Often employed to free up memory buffers, queue slots, or other system resources that would otherwise be consumed by unwanted data.
    • Data Filtering: Used to selectively process only relevant data, effectively skipping or ignoring records or messages that do not meet specific criteria.
    • Error Handling: A common strategy in error recovery, preventing malformed or invalid data from propagating further into a system or corrupting subsequent processes.
    • Non-Persistence: Data that is discarded is typically not written to persistent storage or is explicitly removed from a temporary storage mechanism.

Use Cases

    • CICS Transaction Management: A CICS application might discard invalid terminal input or unwanted data from temporary storage queues (TSQ) or transient data queues (TDQ) after a transaction completes or if an error occurs.
    • IBM MQ Message Processing: An IBM MQ application might discard a message from a queue if it's a "poison message" (unsuccessfully processed multiple times), has expired, or is explicitly removed without being committed.
    • Batch Data Filtering: A COBOL program in a batch job might read records from an input file but discard those that do not meet specific business rules or validation criteria, processing only the relevant subset.
    • Data Stream Management: When processing continuous data streams, an application might discard older or less critical data to maintain performance or manage buffer limits.

Related Concepts

Discarding is intrinsically linked to resource management, error handling, and data validation. It contrasts with data persistence and data processing, as its goal is to prevent data from being saved or acted upon. In CICS, it relates to transaction integrity and terminal control. In IBM MQ, it's a critical part of message lifecycle management and queue depth control, ensuring that queues don't become overloaded with unprocessable messages. It's a fundamental technique for maintaining system stability and data quality.

Best Practices:
  • Log Discarded Data: Always log details about *why* data was discarded (e.g., error codes, message IDs, record keys) to facilitate debugging, auditing, and problem resolution.
  • Define Clear Criteria: Establish precise and robust criteria for when data should be discarded to prevent accidental data loss and ensure consistent application behavior.
  • Graceful Resource Release: Ensure that any system resources (e.g., memory buffers, file handles, database locks) associated with the discarded data are properly released.
  • Monitor Discard Rates: Implement monitoring for discard events, especially in high-volume systems like IBM MQ or CICS, to detect potential issues with upstream data quality or application logic.
  • Avoid Silent Discards: Design applications to provide feedback or alerts when significant amounts of data are discarded, rather than silently failing to process it.

Related Vendors

MacKinney Systems

54 products

UNICOM Systems

35 products

IBM

646 products

Trax Softworks

3 products

Related Categories

email

33 products

CICS

214 products

Tools and Utilities

519 products

Administration

395 products

Security

144 products

Operating System

154 products