Activity browsing in CICS refers to the ability to monitor, view, and analyze system activities, transactions, tasks, and performance metrics in real-time or through historical data. This capability is essential for system administrators, performance analysts, and developers who need to understand system behavior, troubleshoot issues, optimize performance, and ensure system health. This guide covers the CICS Monitoring Facility (CMF), active tasks display, system activity monitoring, and various tools for browsing CICS activities.
What is Activity Browsing?
Activity browsing in CICS allows you to:
View Active Tasks: See which transactions are currently running, their status, and resource usage
Monitor System Performance: Track CPU usage, response times, transaction rates, and resource consumption
Analyze Transaction Behavior: Understand how transactions execute, what resources they use, and where they spend time
Identify Bottlenecks: Find performance issues, resource contention, and system constraints
Track Historical Data: Review past system activity for capacity planning and trend analysis
Debug Issues: Investigate errors, abends, and exception conditions
CICS Monitoring Facility (CMF)
The CICS Monitoring Facility (CMF) is the primary mechanism for collecting performance and activity data in CICS. CMF collects detailed information about transaction execution, resource usage, and system behavior.
CMF Data Classes
CMF collects three classes of monitoring data:
Dictionary Class (Class 1): Defines the format and structure of monitoring data fields. Written when monitoring is activated, it describes all available fields including user-defined fields.
Performance Class (Class 3): Contains detailed transaction-level performance data. One record is written for each transaction when it completes, including resource usage, response times, and execution statistics.
Exception Class (Class 4): Records exception conditions that occur during transaction execution, such as waits for storage, file strings, or other resources.
Enabling CMF Monitoring
CMF monitoring can be enabled through several methods:
CEMT Command: Use CEMT SET MONITOR ON to activate monitoring
System Initialization: Configure monitoring in the System Initialization Table (SIT) or Monitoring Definitions (MD)
Monitoring Definitions: Define monitoring parameters including which data classes to collect and where to write the data
text
1
2
3
4
CEMT SET MONITOR ON
CEMT SET MONITOR TDQ(CMFQUEUE)
CEMT SET MONITOR INCLUDE(ALL)
CEMT SET MONITOR EXCLUDE(NONE)
CMF Data Output
CMF writes monitoring data to:
SMF Records: Type 110 records for batch analysis and reporting
Transient Data Queues: Real-time monitoring data for immediate processing
User Programs: Custom monitoring modules can process data in real-time
Active Tasks Display
The Active Tasks Display shows all currently running and suspended tasks in a CICS region. This is one of the most commonly used tools for real-time activity browsing.
Accessing Active Tasks
Active tasks can be viewed through:
CEMT Transaction: Use CEMT I TASK to display task information
CICS Explorer: Graphical interface showing active tasks with detailed information
Third-Party Tools: Monitoring tools like CA SYSVIEW, BMC AMI Ops Monitor, or IBM Tivoli
Task Information Displayed
The active tasks display typically shows:
Transaction ID: The four-character transaction identifier
Task Number: Unique identifier for the task
Program Name: Currently executing program
Terminal ID: Terminal or connection associated with the task
Wait Type: Type of wait condition if the task is suspended
Wait Name: Specific resource or condition the task is waiting for
CPU Time: Amount of CPU time consumed by the task
Lifetime: How long the task has been running
User ID: User identifier associated with the task
text
1
2
3
4
5
6
7
8
9
10
11
12
CEMT I TASK
TASK STATUS:
Task Number: 222
Transaction: CEMT
Program: DFHEMTD
Terminal: U015
Wait Type: ZCIOWAIT
Wait Name: DFHZARQ1
CPU Time: 0.090 seconds
Lifetime: 00:05:34
User ID: USER01
Task States
Tasks can be in various states:
Running: Task is actively executing
Suspended: Task is waiting for a resource or event
Dispatching: Task is ready to run but waiting for CPU
Waiting: Task is waiting for I/O, storage, or other resources
System Activity Monitoring
System activity monitoring provides a high-level view of overall CICS system performance and resource utilization.
System Activity Metrics
Key system activity metrics include:
Transaction Rate: Number of transactions processed per second
Active Tasks: Current number of running and suspended tasks
CPU Utilization: Percentage of CPU time used by CICS
Storage Usage: Memory consumption across different storage areas (DSA, EDSA, CDSA, etc.)
Response Times: Average and maximum transaction response times
Resource Utilization: Usage of files, temporary storage, transient data, and other resources
I/O Rates: Input/output operations per second
CICS Statistics
CICS Statistics provide system-level data collected at regular intervals:
Dispatcher Statistics: Task scheduling and dispatching information
Storage Statistics: Memory allocation and usage patterns
File Control Statistics: VSAM and file access patterns
Temporary Storage Statistics: TS queue usage and performance
CEMT I SYSTEM
SYSTEM STATUS:
Current Tasks: 45
Max Tasks: 100
CPU Time: 12.5%
Transaction Rate: 150/sec
Average Response Time: 0.25 seconds
Storage Usage:
DSA: 65%
EDSA: 45%
CDSA: 30%
File Requests: 2,500/sec
TS Requests: 1,200/sec
Task Monitoring
Task monitoring focuses on individual task behavior and resource consumption. This is essential for understanding transaction performance and identifying issues.
Task-Level Metrics
Each task provides detailed metrics:
Execution Time: Total time from task start to completion
CPU Time: Actual CPU processing time consumed
Wait Time: Time spent waiting for resources
I/O Operations: Number and type of I/O operations performed
Storage Usage: Memory allocated and used by the task
CICS Commands: Number and type of EXEC CICS commands executed
Program Calls: Programs loaded and executed during the task
Resource Access: Files, databases, and other resources accessed
Monitoring Task Execution
You can monitor task execution through:
Real-Time Display: View tasks as they execute using CEMT or monitoring tools
CMF Records: Analyze detailed task data from CMF performance records
Transaction Traces: Use CICS tracing to see detailed execution flow
Performance Analyzer: Use tools to analyze task performance patterns
Performance Monitoring
Performance monitoring helps identify bottlenecks, optimize resource usage, and ensure system responsiveness.
Response Time Analysis
Response time is a critical performance metric:
Short Transactions: Typically under 1 second, require fast response
Medium Transactions: 1-5 seconds, moderate complexity
Long Transactions: Over 5 seconds, complex processing or batch-like operations
Conversational Transactions: Multiple interactions, response time per interaction
Resource Contention
Monitoring helps identify resource contention:
Storage Contention: Tasks waiting for memory allocation
File Contention: Multiple tasks competing for the same files
Lock Contention: Tasks waiting for resource locks
CPU Contention: More tasks than available CPU capacity
Exception Monitoring
Exception class data records when tasks encounter problems:
Storage Waits: Tasks waiting for DSA, EDSA, or other storage areas
File String Waits: Tasks waiting for VSAM file strings
Temporary Storage Waits: Tasks waiting for TS queue space
Buffer Waits: Tasks waiting for buffer allocation
Browsing Historical Data
Historical data browsing allows analysis of past system behavior for capacity planning and trend analysis.
SMF Data Analysis
SMF (System Management Facility) records provide historical data:
SMF Type 110: CICS monitoring data records
Batch Processing: Analyze SMF data using reporting tools
Trend Analysis: Identify patterns and trends over time
Capacity Planning: Use historical data to predict future needs
Reporting Tools
Various tools can process and report on CICS activity data:
IBM Tools: CICS Performance Analyzer, CICS Monitoring Tools
Third-Party Tools: CA SYSVIEW, BMC AMI Ops Monitor, IBM Tivoli
Custom Programs: User-written programs to analyze CMF data
cicsmfmt: CICS-supplied monitoring data formatter
Using CICS Explorer for Activity Browsing
CICS Explorer provides a graphical interface for browsing CICS activities:
Task Views: Visual display of active tasks with filtering and sorting
Performance Views: Charts and graphs showing system performance
Resource Views: Display of resource usage and status
Historical Views: Analysis of past system activity
Custom Perspectives: Create custom views tailored to your needs
Best Practices for Activity Browsing
1. Regular Monitoring
Monitor system activity regularly to establish baselines
Set up alerts for critical conditions (high CPU, storage shortages, etc.)
Review performance trends over time
Compare current performance against historical data
2. Focus on Key Metrics
Transaction response times
CPU utilization
Storage usage and availability
Resource contention indicators
Exception condition frequency
3. Use Appropriate Tools
Use real-time tools for immediate problem diagnosis
Use historical analysis tools for capacity planning
Combine multiple tools for comprehensive analysis
Customize views to show relevant information
4. Understand Context
Consider business cycles and peak times
Understand normal vs. abnormal behavior
Correlate activity with business events
Account for system maintenance and changes
Explain It Like I'm 5 Years Old
Imagine CICS is like a busy restaurant:
Activity browsing is like having a special window where you can watch everything happening in the restaurant. You can see which tables (tasks) are being served, which customers (transactions) are waiting, how fast the kitchen (CPU) is working, and if there are any problems.
Just like a restaurant manager watches to make sure everything runs smoothly, system administrators use activity browsing to watch CICS. They can see if transactions are running too slowly (like slow service), if the system is too busy (like a crowded restaurant), or if something is broken (like a broken oven).
Activity browsing helps them understand what's happening right now (like watching the restaurant live) and what happened in the past (like looking at yesterday's sales report). This helps them fix problems quickly and make sure everything works well!
Exercises
Exercise 1: View Active Tasks
Practice viewing active tasks in your CICS system:
Use CEMT I TASK to display all active tasks
Identify which transactions are running
Note which tasks are suspended and what they're waiting for
Check CPU time and lifetime for each task
Question: What is the most common wait type you observe? What does this tell you about system behavior?
Exercise 2: Enable CMF Monitoring
Configure CMF monitoring:
Enable CMF monitoring using CEMT commands
Configure monitoring to write to a transient data queue
Set up monitoring to include all data classes
Verify monitoring is active
Hint: Use CEMT I MONITOR to verify monitoring status.
Exercise 3: Analyze System Activity
Analyze overall system activity:
Display system status using CEMT I SYSTEM
Note current task count vs. maximum tasks
Check CPU utilization percentage
Review transaction rate and response times
Examine storage usage across different areas
Question: If CPU utilization is consistently high, what might be the cause? What actions could you take?
Exercise 4: Identify Performance Issues
Use activity browsing to identify potential performance issues:
Look for tasks with unusually long lifetimes
Identify tasks waiting for resources
Check for high CPU usage by specific transactions
Review exception conditions
Document your findings
Quiz
Test Your Knowledge
1. What are the three classes of CMF monitoring data?
A) Dictionary, Performance, Exception
B) Transaction, System, Resource
C) Real-time, Historical, Statistical
D) Active, Suspended, Completed
2. What command is used to display active tasks in CICS?
A) CEMT I SYSTEM
B) CEMT I TASK
C) CEMT I MONITOR
D) CEMT I RESOURCE
3. What does CMF Performance Class data contain?
A) System configuration information
B) Detailed transaction-level performance data
C) Security violation records
D) Program compilation statistics
4. What is the primary purpose of activity browsing in CICS?
A) To modify system configuration
B) To monitor, view, and analyze system activities and performance
C) To compile application programs
D) To manage security profiles
5. Where does CMF write monitoring data?
A) Only to SMF records
B) Only to transient data queues
C) To SMF records, transient data queues, or user programs
D) Only to log files
6. What information is typically shown in an active tasks display?
A) Only transaction IDs
B) Transaction ID, task number, program name, terminal, wait information, CPU time, and lifetime