Task Flow Recorder

CICS Task Flow Recorder (TFR) is a software tool that records the entire program flow path and sequence of events for selected CICS tasks.

None of the CICS monitors or debuggers available today offers a detail level and clarity that’s even close to what TFR provides.

Tasks that are being recorded run normally, without CEDF and without breakpoints. Users who run these tasks may not even know that they are being recorded.

TFR records and displays every:

  • CICS command, its major operand and offset in the program.

  • DB2, ADABAS and DL/I calls or any other remote service.

  • Subroutines invoked via EXEC CICS LINK, dynamic call or even static call.

  • Every TCB switch.

  • Program abends, and invocations of “handle abend” labels.

  • All of the above, within mirror tasks that were originated by the recorded task, and ran in other regions.


For each of the event types listed above, for each linked program and for program code fragments between CICS commands, TFR measures the elapsed time.  Hence, it is very easy for users to pinpoint runtime bottlenecks.

The product is activated easily by every developer, without the involvement of a systems programmer.  The event list of a recorded task is available instantaneously.  If you record a long-running task, you can watch its execution flow while it is still running, up till this very moment.

Suppose TFR is currently inactive in your CICS region, and you have a long-running task that seems to hang up in a loop. You can activate TFR and have it record the task in question beginning now.

TFR is controlled from the browser via a cutting-edge Web GUI, which runs under WebSphere Liberty Server.

TFR can also record the actual content of commarea, VSAM file records, TS QUEUE or TD QUEUE, screen input and output, containers, DB2 query results and Adabas record buffers.  When, for example, you examine the event list of a task and encounter a WRITE command, you also see the content of the record that had been written (in character and hexadecimal formats).

The recorded content can also be mapped and shown field by field, using the COBOL structure (copybook) associated with the record, as in the following image:


Task event list and execution flow

TFR is capable of showing every paragraph and section that the recorded COBOL program has reached; even when that paragraph contains no CICS commands.

TFR can trace the values of specific working-storage and linkage section variables during program execution.  TFR can even take full working-storage snapshots upon each CICS or database command.  Each snapshot is saved, so later on, users can examine what the content of any working-storage variable was during every CICS call.  The working-storage is displayed field by field.  No breakpoints are necessary. The recorded tasks run normally, at a full speed, and the information is captured for later viewing.

TFR can also display the “Delta working-storage”, i.e. only the variables that had changed between two consecutive snapshots.

working-storage changes

TFR is activated upon request, for the desired period of time or the desired number of tasks to record, though it may also be activated for prolonged periods.


In order to lower the amount of data being logged and saved, it is possible to instruct TFR to only retain tasks that either abended or ran longer than a given threshold.

Full MRO/Sysplex capability.  When a recorded task issues a remote LINK that causes a mirror task to run in another CICS region, that mirror task is recorded as well.  When the sequence of events of the parent task is displayed, the events that occurred in the mirror tasks are shown as well, in chronological order, i.e. right after the LINK commands that invoked them.

When CICS tasks use Dynamic Call to other programs or even Static Call to other CSECTS within the same module, TFR detects the entire sequence of CALL and GOBACK commands, and adds these commands to the event log.

TFR also records and displays CICS commands that are not part of your program code, but were inserted into your task by CICS itself.  These commands include LOAD, PUSH HANDLE, POP HANDLE, GETMAIN, FREEMAIN, WRITEQ TD and others, that most developers are not even aware of.

Occasionally, related CICS tasks that run at the same time communicate with each other.  They synchronize their actions and wait for each other using ENQ, DEQ, DELAY, CANCEL, WAIT, POST, SEND, RECEIVE mechanisms.  TFR is capable of presenting their event lists together, side by side, in chronological order.  Such presentation helps developers understand the synchronization between the tasks, the exact moments in which one task had yielded control to another, and the reasons for potential deadlocks.

Control flow and deadlock investigation

When software developers are puzzled why two instances of the same transaction vary significantly in their run time, flow path or the number of events, they can use TFR’s fantastic “Diff” utility.  Diff compares two tasks, event after event, and highlights the differences; similarly to a source-code version comparator.

Task comparison

TFR can also compare the values of two records, and display the differences in either a dump format, or field after field, using the records’ copybook.
For example, the recorded program issues READ UPDATE and then REWRITE.  TFR can show you exactly which fields got changed.

TFR can also compare records from two different tasks.


The Uniqueness of TFR

People who hear about the product for the first time, and have not yet taken the time to watch the live demo,  sometimes react:  “We already have CICS debuggers and monitors such as Expeditor, InterTest, TMON, Omegamon, MainView.  Why do we need another developer tool?”

Our experience shows that this reaction disappears once the person watches the demo.

In fact, there is absolutely no overlap between the information and services provided by TFR and the ones provided by the other products.

  • TFR tells you the exact whereabouts of a task, including its mirror tasks. The information is saved for future reference and comparison with other tasks.

  • With TFR, you don’t have to set breakpoints, and you don’t have to run step-by-step. The tasks run normally.

  • TFR can record tasks submitted by other users without them even knowing. The recording process is instantaneous, and the results are available immediately.

  • As opposed to CEDF or other trace tools, TFR knows when a CICS command is issued from a dynamically-called or statically-called program, and the exact offset of the command within the calling CSECT.

  • TFR can compare tasks; something that you can’t even hope to get with other tools.

  • TFR tells the exact time spent in every LINKed or CALLed program.

  • TFR provides a Task Summary that shows the total number of times each distinct command took place, either in a particular task, or throughout the recording session.

  • When the recorded task reads or writes a record, TFR displays the record mapped by its COBOL structure (copybook).

  • When the recorded task issues SQL/DB2 commands, TFR displays the result set field by field, as well as the SQL statement itself.

  • When several tasks run at the same time, and communicate with each other, TFR can display their execution flows side by side in a single chronologically-ordered list. If they ran into a deadlock, TFR shows you how and why it happened.

  • If a transaction runs fine 99% of the times, but hangs up in some rare situations, it is practically impossible to find the problem using a regular debugger. When you run the problematic transaction with a debugger, you are most likely to get the regular case; not the rare one. With TFR, you simply record hundreds of instances of the transaction, and then focus on the problematic cases. Or you just let TFR compare the bad instance with a good one.

Benefits and Cost Justification

TFR vastly increases the productivity and efficiency of your CICS development team.  It provides the application developer with information that cannot be obtained by any of the known CICS monitors or debuggers.

  • Speeds up software development and debugging time.

  • Speeds up the learning process of existing applications written by developers who are no longer with the company.

  • Speeds up understanding of production problems and bug detection.

  • Reduces to nothing the time it takes to figure out dead-lock situations.

  • Reduces to nothing the time it takes to understand when and why a particular program variable received some unexpected value.

  • Helps creating software documentation.

  • Finds bottlenecks and pinpoints code fragments responsible for slow response time.

With TFR, there are no surprises and no question marks regarding what exactly your transactions are doing.  TFR shows you exactly what’s going on in your code, which programs call or link to a particular program and who accesses a particular file. You won’t need a slow step-by-step debugger to track task activity.  Simply run your tasks normally, without CEDF and without breakpoints, and let TFR show you the complete sequence of events, working-storage variables, program parameters, records that had been read or written, and data that had been sent.

TFR increases the reliability of change management process and the accuracy of Quality Assurance tests.  The product should serve as an integral step during deployment of application changes.  Developers and quality assurance professionals should record their transactions before and after the change, and then use TFR’s Diff tool to compare program execution flow of the two versions.  This comparison ensures that changes in the program event list are exactly what we expected them to be.

TFR can also serve as a full scale activity logger for sensitive transactions.

Live Demo