Chapter 17 Exercises

Section 17.1 — MAXT and MXT

Exercise 1: MXT Calculation

A CICS AOR processes the following transaction mix at peak: - Transaction ACCT: 800 TPS, average response time 40ms - Transaction LKUP: 2,000 TPS, average response time 20ms - Transaction RPRT: 50 TPS, average response time 3 seconds - Transaction AUDT: 100 TPS, average response time 100ms

Calculate the required MXT using a safety factor of 2.0. Show your work for each transaction type. Which transaction type contributes the most concurrent tasks, and why?

Exercise 2: MAXT Root Cause Analysis

You receive DFHZC0101 (MAXT condition) on a production AOR at 11:30 AM. MXT is 300. You gather the following data: - Peak TPS: normal (1,500 — same as previous day) - Average response time: 400ms (normal is 60ms) - QR TCB busy: 45% (normal is 30%) - DB2 thread wait count: 847 in the last 15 minutes (normal is 0) - EUDSA usage: 72% (normal is 55%)

Identify the most likely root cause. Explain the chain of events that led to MAXT. Recommend an immediate action and a permanent fix.

Exercise 3: Storage-Bounded MXT

An AOR has EDSALIM=800M. After CICS kernel and system overhead, approximately 350 MB of EUDSA is available for user tasks. The average per-task storage (working storage + TCA + user GETMAIN) is 600 KB. The current MXT is 700.

a) Calculate the storage-bounded MXT. b) Is the current MXT safe? What happens if all 700 tasks are simultaneously active? c) What MXT value would you recommend, and why?

Exercise 4: MAXT vs. TRANCLASS Wait

Explain the difference between a MAXT condition and a TRANCLASS wait. For each of the following scenarios, determine whether the event is a MAXT condition, a TRANCLASS wait, or both:

a) MXT is 200, TRANCLASS CLSBULK has MAXACTIVE(30). There are 150 active tasks, 25 of which are in CLSBULK. A new CLSBULK transaction arrives. b) Same configuration, but there are 200 active tasks, 30 of which are in CLSBULK. A new CLSBULK transaction arrives. c) Same configuration, but there are 200 active tasks, 20 of which are in CLSBULK. A new high-priority transaction (not in any TRANCLASS) arrives. d) Same configuration, but there are 150 active tasks, 30 of which are in CLSBULK. A new CLSBULK transaction arrives.


Section 17.2 — Task Management and Dispatching

Exercise 5: QR TCB Saturation

A CICS region processes 1,500 TPS. Each transaction executes on the QR TCB for an average of 0.4ms of CPU time. Calculate the QR TCB busy percentage. At what TPS does the QR TCB become 100% saturated (theoretically)?

Exercise 6: THREADSAFE Impact Assessment

You manage a CICS region with 20 application programs. The top 5 programs (by volume) account for 85% of transactions. Currently, all 20 programs run as QUASIRENT. Each of the top 5 programs makes an average of 4 DB2 calls per execution, with each call averaging 8ms of elapsed time.

a) Calculate the total QR TCB blocking time per second caused by DB2 calls for the top 5 programs (assume 3,000 TPS total, 85% going through these programs). b) If you convert these 5 programs to THREADSAFE, how much QR TCB blocking time is eliminated per second? c) What prerequisites must be met before a program can be defined as THREADSAFE? List at least four. d) What testing would you perform before deploying THREADSAFE changes to production?

Exercise 7: Task Priority Design

Design a task priority scheme for Pinnacle Health Insurance's CICS environment. The transaction types are: - Real-time eligibility verification (provider calling with patient waiting) - Claims adjudication (online, adjuster working) - EDI 837 inbound processing (batch-initiated CICS) - Provider directory lookup (online, patient-facing) - Monthly regulatory report generation (CICS-based) - System monitoring transactions

Assign priorities (0–255) and justify each. Consider what happens during congestion — which transactions should be favored?

Exercise 8: Cooperative Multitasking Impact

A developer writes a COBOL program that builds an in-memory hash table by PERFORMing a loop 500,000 times. The loop contains no EXEC CICS commands. Each iteration takes approximately 0.001ms (1 microsecond).

a) How long does this loop hold the QR TCB? b) During that time, how many other transactions could have been dispatched (assume 0.3ms average QR CPU per transaction)? c) Propose three alternative designs that achieve the same functionality without monopolizing the QR TCB.


Section 17.3 — CICS Storage Architecture

Exercise 9: EDSALIM Sizing

You collect the following EUDSA statistics for an AOR over a 24-hour peak-day period (values in MB):

Time Current Peak
08:00 320 320
10:00 410 425
12:00 480 495
14:00 500 520
16:00 440 520
18:00 350 520

Current EDSALIM is 700M.

a) What is the peak EUDSA usage, and what percentage of EDSALIM is it? b) Using the 30% headroom guideline, what EDSALIM would you recommend? c) Is the current EDSALIM of 700M appropriate, too low, or too high? Justify your answer. d) The 14:00 peak coincides with a promotional email campaign. If the campaign were to double its impact, what EDSALIM would you need?

Exercise 10: Storage Leak Detection

You observe the following EUDSA pattern over 8 hours:

Time EUDSA (MB) Active Tasks
09:00 300 120
10:00 320 125
11:00 345 118
12:00 370 130
13:00 398 122
14:00 420 128
15:00 448 120
16:00 475 125

a) Is this pattern consistent with normal usage or a storage leak? Justify your conclusion. b) Calculate the approximate leak rate in MB per hour. c) If EDSALIM is 800M and the CICS kernel uses 250M, how many hours until SOS? d) Describe the diagnostic steps you would take to identify the leaking program.

Exercise 11: Working Storage Optimization

A high-volume CICS program (1,200 TPS) has the following WORKING-STORAGE SECTION layout:

01  WS-CUSTOMER-RECORD      PIC X(500).
01  WS-TRANSACTION-LOG       PIC X(2000).
01  WS-ERROR-TABLE.
    05  WS-ERROR-ENTRY       OCCURS 1000 TIMES.
        10  WS-ERR-CODE      PIC X(10).
        10  WS-ERR-DESC      PIC X(200).
01  WS-SORT-BUFFER           PIC X(500000).
01  WS-WORKING-FIELDS.
    05  WS-COUNTER           PIC 9(8).
    05  WS-FLAGS             PIC X(20).

a) Calculate the total working storage size. b) At 1,200 TPS with 40ms average response time, how many concurrent tasks are expected? What is the total EUDSA consumed by working storage alone? c) Identify at least two optimization opportunities to reduce per-task storage without changing functionality. d) Calculate the EUDSA savings from each optimization.


Section 17.4 — Transaction Class Management

Exercise 12: TRANCLASS Design

Design a TRANCLASS configuration for Federal Benefits Administration (FBA). Their CICS region handles: - Real-time eligibility queries (15% of volume, SLA: 300ms) - Payment calculation (25% of volume, SLA: 1 second) - Batch-initiated case processing (40% of volume, SLA: 10 seconds) - Administrative inquiries (15% of volume, SLA: 2 seconds) - System tasks (5% of volume)

MXT is 400. Define TRANCLASS names, MAXACTIVE values, and PRIORITY settings. Ensure that batch-initiated processing cannot starve real-time queries even during month-end surges.

Exercise 13: Dynamic Throttling

During a production incident, you discover that a batch-initiated CICS workload (TRANCLASS CLSBATCH, MAXACTIVE 100) is consuming excessive DB2 threads and degrading other workloads. You need to throttle it immediately.

a) Write the CEMT command to reduce CLSBATCH's MAXACTIVE to 20. b) What happens to the 80 currently active tasks in CLSBATCH when you reduce MAXACTIVE? c) If CLSBATCH transactions have an average response time of 5 seconds, how long until the active count drops below 20 naturally? d) Would you use PURGE or FORCEPURGE to speed up the drain? Under what circumstances would each be appropriate?

Exercise 14: TRANCLASS Monitoring

You review CICS statistics and find: - CLSCRIT: 0 TRANCLASS waits, peak 45 of MAXACTIVE(80) - CLSONLN: 147 TRANCLASS waits in 1 hour, peak 100 of MAXACTIVE(100) - CLSBULK: 2,340 TRANCLASS waits in 1 hour, peak 30 of MAXACTIVE(30) - CLSSYS: 0 TRANCLASS waits, peak 8 of MAXACTIVE(20) - Overall: 0 MAXT conditions

Interpret these statistics. Which classes are well-configured? Which need adjustment? Is this a healthy region or a problem?


Section 17.5 — Performance Monitoring

Exercise 15: SMF 110 Analysis

You extract SMF 110 Type 1 records for transaction XFER over a 1-hour period and compute the following:

Metric Mean P50 P95 P99 Max
Elapsed (ms) 85 60 200 800 4,500
CPU (ms) 3.2 2.8 5.1 8.0 15.0
DB2 wait (ms) 45 30 120 500 3,800
Dispatch wait (ms) 8 2 40 200 600
File I/O wait (ms) 12 10 25 50 100

a) What is the dominant wait category? b) Is the P99 elapsed time likely caused by CICS or DB2? What evidence supports your conclusion? c) The SLA is 500ms for 95% of transactions. Is the SLA being met? d) Propose three specific investigations to reduce the P95 and P99 elapsed times.

Exercise 16: Self-Aware Transaction Design

Write a COBOL code fragment that implements the "self-aware transaction" pattern described in Section 17.5. The code should: - Capture the start time using EXEC CICS ASKTIME - Execute business logic (represented by a comment placeholder) - Capture the end time - Calculate elapsed time in milliseconds - If elapsed exceeds a threshold (stored in a CICS TS queue), write a performance alert record to a CICS TD queue including: transaction ID, task number, elapsed time, timestamp, and the name of the program

Exercise 17: Auxiliary Trace Analysis

You activate auxiliary trace filtered to the DB2 domain for transaction XFER and capture 500 trace entries over 10 seconds. The trace shows:

  • 200 entries: "DB2 call initiated" → "DB2 call completed" with elapsed 5–15ms (normal)
  • 50 entries: "DB2 call initiated" → "DB2 call completed" with elapsed 200–500ms (slow)
  • The slow entries all reference the same DB2 plan section

a) What percentage of DB2 calls are slow? b) What is the likely cause of the slow calls? c) What DB2 diagnostic data would you request from the DBA team to confirm your hypothesis? d) If the slow DB2 plan section corresponds to a SELECT with a predicate on a non-indexed column, what is the permanent fix?


Section 17.6 — Diagnosing Production Problems

Exercise 18: Incident Timeline Reconstruction

You receive the following alerts for AOR region CNBAORB1 over a 15-minute period:

  • 14:00 — QR TCB busy rises from 35% to 65%
  • 14:03 — Average response time for INQR rises from 50ms to 300ms
  • 14:05 — EUDSA usage rises from 55% to 70%
  • 14:07 — TRANCLASS CLSONLN hits MAXACTIVE
  • 14:09 — MAXT condition (MXT reached)
  • 14:10 — SOS condition (EUDSA cushion breached)
  • 14:12 — Program compression initiated
  • 14:14 — Operator emergency: CEMT SET TRANCLASS(CLSBULK) MAXACTIVE(5)

Reconstruct the chain of events. What was the likely root cause (it was not a volume spike — TPS was normal)? What should the operator have done differently, and when?

Exercise 19: Comparative Diagnosis

Two AOR regions (AORA1 and AORB1) run identical transaction mixes with identical configurations. Over the past week:

Metric AORA1 AORB1
Average response time 55ms 82ms
QR TCB busy 28% 45%
MAXT conditions 0 3
EUDSA peak 62% 71%
DB2 thread waits 12 185
Program compression 0 7

List the top three hypotheses for why AORB1 is performing worse than AORA1. For each hypothesis, describe the specific data you would collect to confirm or eliminate it.

Exercise 20: Post-Deployment Regression

A new version of program PGMXFER is deployed to production at 10:00 AM via CICS NEWCOPY. By 10:30 AM, the region's average response time has doubled. The developer says "I only added a small feature."

Write a diagnostic checklist (at least 8 items) that the operations team should work through in the first 15 minutes. For each item, specify what tool or data source provides the answer and what action to take if the item is the root cause.


Section 17.7 — Capacity Planning

Exercise 21: Growth Projection

An AOR currently runs at peak metrics: - Peak TPS: 1,800 - Peak tasks: 130 (MXT 200) - Peak EUDSA: 420 MB (EDSALIM 700M) - QR TCB busy: 55%

Business projects 15% annual growth in transaction volume. A new mobile API channel is expected to add 500 TPS in Year 2.

a) Project peak tasks for Years 1, 2, and 3. b) Project QR TCB busy for Years 1, 2, and 3 (assume linear relationship with TPS). c) In which year does the first bottleneck appear? Which resource hits its limit first? d) Recommend a scaling strategy: vertical, horizontal, or both? Justify with specific numbers.

Exercise 22: Failure-Scenario Capacity Model

Your topology has 2 AORs (MXT 250 each) with dynamic routing and a combined peak of 3,200 TPS. Normal peak tasks per AOR: 160.

a) If AOR1 fails and all traffic routes to AOR2, what is the expected task count on AOR2? b) Does AOR2 survive (tasks within MXT) or hit MAXT? c) If AOR2 hits MAXT, what is the minimum MXT setting that would allow it to absorb the full load? d) What is the storage implication of this higher MXT? Calculate using 450 KB average per-task storage.

Exercise 23: WLM Misclassification

A CICS AOR is accidentally placed in a DISCRETIONARY WLM service class (intended for batch). Transactions run correctly but with 3x normal response times. All CICS-level metrics (task counts, storage, QR TCB busy) look normal.

a) Why do CICS-level metrics not reflect the problem? b) What z/OS-level metric would reveal the misclassification? c) How would you verify the WLM service class assignment for a CICS region? d) If you fix the WLM service class at 2 PM, how quickly should response times recover?


Integration Exercises

Exercise 24: End-to-End Performance Design

You are designing a new CICS transaction for Pinnacle Health's real-time eligibility verification. Requirements: - Target: 3,000 TPS across 4 AORs - SLA: 200ms for 99% of transactions - Each transaction: 1 DB2 read (member lookup), 1 DB2 read (plan details), 1 DB2 write (audit) - Expected DB2 elapsed per call: 5ms

Design the complete performance configuration: a) MXT per AOR b) CMDT per AOR c) TRANCLASS definition d) EDSALIM (assume 200 KB working storage per task) e) WLM service class goal f) Self-aware transaction threshold g) Monitoring alerts and thresholds

Exercise 25: Cross-Chapter Integration

At CNB, a new regulatory requirement mandates that every fund transfer (transaction XFER) must now also write to a new VSAM audit file on a File-Owning Region via function shipping (MRO). The VSAM write adds 15ms of elapsed time per transaction.

a) How does this change affect XFER's concurrent task count? (XFER runs 400 TPS with original 80ms response → now 95ms.) b) How does it affect the AOR's MXT requirement? c) How does it affect the AOR's EUDSA consumption? (Each task now holds storage 18.75% longer.) d) How does it affect the FOR's VSAM file control performance? (400 writes/second to a single VSAM file.) e) Referencing Chapter 13's topology principles, would you recommend function shipping or DPL for this audit write? Why? f) Referencing Chapter 15, would you use a COMMAREA or a channel to pass the audit data to the FOR? Why?