Modernization Hub

Interval Control

Enhanced Definition

Interval Control in CICS (Customer Information Control System) is a core component responsible for managing time-dependent operations, allowing CICS applications to schedule events, introduce delays, and synchronize tasks based on time or external events. It provides a mechanism for asynchronous processing by enabling transactions to pause, wait for a specific duration, or be initiated at a future point in time.

Key Characteristics

    • Asynchronous Processing: Facilitates non-blocking operations by allowing a task to suspend itself for a period or wait for an event without monopolizing the CPU, enabling other tasks to run.
    • Time-Based Scheduling: Supports scheduling transactions to start at a specified future time or after a particular interval using the EXEC CICS START command with TIME or INTERVAL options.
    • Task Delay: Allows a running transaction to pause its execution for a specified duration using the EXEC CICS DELAY command, after which it resumes processing.
    • Event Synchronization: Provides mechanisms (EXEC CICS POST and EXEC CICS WAIT EVENT) for tasks to synchronize their execution based on the occurrence of an event, which can be signaled by another task or an external process.
    • CICS Dispatcher Integration: Relies heavily on the CICS Dispatcher to manage the suspension and resumption of tasks, ensuring efficient use of system resources.
    • Timer Domain: Internally, CICS uses a Timer Domain to manage all time-related requests, tracking scheduled events and elapsed intervals.

Use Cases

    • Future Transaction Initiation: Scheduling a batch-like CICS transaction to run at 2:00 AM daily to perform data cleanup or report generation, using EXEC CICS START TRANSID('CLEAN') TIME(020000).
    • Introducing Delays: Implementing a "retry" logic where a transaction attempts an operation, and if it fails, it DELAYs for 5 seconds before retrying, to account for temporary resource unavailability.
    • Polling Mechanisms: A transaction might DELAY for a short interval and then check the status of an external resource or a shared flag, repeating this process until a condition is met.
    • User Experience Enhancements: In some interactive scenarios, a small DELAY might be introduced to allow a user to perceive a background process completing, although this is generally discouraged for online tasks.
    • Inter-Task Synchronization: One CICS task performs a long-running calculation and then uses EXEC CICS POST to signal an event, allowing another task that was EXEC CICS WAIT EVENTing on that event to proceed with processing the results.

Related Concepts

Interval Control is fundamental to CICS's ability to manage asynchronous tasks and multitasking. It works closely with the CICS Dispatcher, which is responsible for giving control to ready tasks and managing the suspension and resumption of tasks that are DELAYing or WAITing. The EXEC CICS START command, often used with Interval Control, is a key mechanism for transaction routing and transaction initiation, allowing transactions to be started on the local or a remote CICS region. For event synchronization, it leverages Event Control Blocks (ECBs), which are internal CICS structures used to manage wait states.

Best Practices:
  • Minimize DELAY in Online Transactions: Avoid using EXEC CICS DELAY for extended periods in interactive CICS transactions, as it ties up valuable CICS task control blocks (TCBs) and resources, potentially impacting system throughput and response times.
  • Use START for Future Processing: For operations that need to occur at a future time or after a significant interval, prefer EXEC CICS START TRANSID(...) INTERVAL(...) over long DELAYs within an existing task. This frees up the current task and allows CICS to manage the new task efficiently.
  • Careful WAIT EVENT Implementation: When using EXEC CICS WAIT EVENT, ensure that the corresponding EXEC CICS POST is guaranteed to occur. Implement robust error handling and timeouts to prevent tasks from waiting indefinitely, which can lead to resource exhaustion.
  • Consider Transaction Design: For long-running or time-dependent processes, design transactions to be restartable and idempotent. Break down complex operations into smaller, independent tasks that can be scheduled using START commands.
  • Monitor Resource Usage: Be mindful of the number of outstanding START requests or POST events. Excessive use can consume CICS internal resources and impact performance.

Related Vendors

ASE

3 products

Macro 4

20 products

Trax Softworks

3 products

Related Categories

Administration

395 products

CICS

214 products

Browse and Edit

64 products