Home > Data Center Tips > CICS Newsletter > CICS trace: Getting started, formatting and externalizing
Data Center Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

CICS NEWSLETTER

CICS trace: Getting started, formatting and externalizing


Robert Crawford, Contributor
01.29.2007
Rating: -4.33- (out of 5)


IT infrastructure news
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


In my five year stint as a Windows programmer I learned many things. Among them were new programming languages and development environments. Within the scope of programming I also learned the drudgery of debugging my programs without all the dandy tools we have on the mainframe. Throughout the whole experience the one I missed the most was the CICS trace.

What is CICS trace?

CICS trace is a wonderful tool for understanding how and why a system or application does things. At defined trace points, CICS writes variable length trace entries into the in-core trace table. In addition, application programs can create their own trace entries with the ENTER TRACENUM command. There are hundreds of trace points with differing levels of detail.
More on CICS tools:
Q&A: IBM offers a peek at new SOAP for CICS

New mainframe migration tools: It's really about app modernization

Over all this, CICS gives you control for each trace point's action and detail with transaction CETR. In fact, I would recommend entering CETR as a quick reference to CICS trace points and the detail levels that are available.

Getting started with CICS trace

The most basic form is the CICS internal trace. As mentioned above, the entries are written into a table in memory. And since the table is in memory, you won't see the entries except in dumps. Also, note that the table is of finite size and CICS will wrap around back to the top of the trace entries when it is full. In a very active system the trace table may wrap in less than a second which means some of the information you need may be overwritten before CICS takes the dump.

Internal trace is controlled through the several System Initialization Table (SIT) parameters:

  • INTTR specifies if internal trace should be started at all
  • SPCTR and SPCTRxx (where "xx" is a domain name) options allow you to control individual trace points and their level of detail.
  • SYSTR is the master system trace flag controlling system trace entries
  • TRTABSZ specifies the size of the internal trace table in K

    Of course, internal tracing comes with overhead. In my own experience, turning trace off saved about 10 to 15% CPU at the transaction level. This is probably why IBM sometimes recommends turning the trace off in production systems. At our own shop, we leave trace off except in regions that support critical applications where we can't afford to have the same problem twice.

    Externalizing CICS trace

    Since internal trace is ephemeral, there are two ways to externalize trace entries without a dump: auxiliary and GTF trace.

    When auxiliary trace is active, CICS writes the entries to the auxiliary trace datasets DFHAUXT and DFHBUXT. Once captured the trace entries must be formatted with the CICS trace utility, DFHTUxxx where "xxx" is CICS' release level. You can select the detail level and trace types of the printed entries. Perhaps even more useful, you can control the utility's output by resource names such as transaction or terminal ID.

    You may control auxiliary trace with the CEMT S AUX command or these SIT parameters:

  • AUXTR tells CICS if you want to start auxiliary trace when it initializes. This can be very handy if you have a problem in a PLTPI program
  • AUXTRSW specifies the auxiliary trace dataset switch behavior. On an active system the auxiliary trace datasets fill up quickly. CICS' default action is to stop auxiliary trace and close the dataset to which it is writing. This parameter, and its corresponding CEMT command, allows you to tell CICS that you would rather switch to the inactive trace dataset.

    Auxiliary trace has a lot of overhead. As I know from experience, you don't want to start it on a busy system in the middle of the day because it will have a direct impact on performance. Therefore, in production it should be used in circumstances that are limited and easily controlled. If that's too difficult, try to duplicate the problem in test and take your trace there.

    My favorite way to externalize trace entries is through MVS' General Trace Facility (GTF) where CICS writes trace records to the GTF trace table. This is very useful if you need to collect debugging information involving several CICS regions or other system components. In my experience, it also causes less overhead than auxiliary trace. The only catch is you have to run MVS' GTF trace capture utility program (AHLGTF) during the activity you want to capture.

    Formatting CICS trace

    Once you capture the trace information you may format it with the IPCS GTF subcommand. Here is the format:

    GF USR(F6C) CICS((xxxx))

    Note that you must specify "USR(F6C)" to tell IPCS to invoke CICS' dump utility program. This also means the dump utility program (DFHDUxxx where "xxx" is the release) must be in STEPLIB, ISPLLIB, LPA or the link list. The "CICS" parameter allows you to specify trace record using the same syntax as the auxiliary trace utility. However, you should consult the IPCS User's Guide because not all choices are available.

    GTF trace is controlled through the GTFTR SIT parameter. Again, it can be handy to turn on GTF trace when CICS initializes if you have a PLTPI problem. You can also use transaction CETR.

    CICS' trace facility can be a profound tool for understanding application and system behavior, given the amount of information it provides. I would recommend turning it on at any odd, idle moment when you want to know more about what makes CICS click, but maybe not in production. They may have taken the source away from us, but we still have the trace.

    ABOUT THE AUTHOR: Robert Crawford has been a CICS systems programmer off and on for 24 years. He is experienced in debugging and tuning applications and has written in COBOL, Assembler and C++ using VSAM, DLI and DB2.

    Rate this Tip
    To rate tips, you must be a member of SearchDataCenter.com.
    Register now to start rating these tips. Log in if you are already a member.




    BROWSE BY TAG
    CICS Newsletter,   Mainframe operating systems and management,   Server hardware,   Mainframe computers,   VIEW ALL TAGS

    Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



    RELATED CONTENT
    CICS Newsletter
    Does IBM's mainframe business constitute a monopoly?
    IBM z/OS 1.11 preview: New features and functions
    New statistics for CICS Transaction Server 3.2
    Manage CICS workloads with transaction classes
    Run CICS in batch to beat a shrinking batch window
    Ensuring CICS security with the Web Services Security standard
    Use DFHLS2WS to expose CICS applications as a Web service
    Using IBM IPCS to battle software bugs
    CICS and Web services: Ready to go
    Using External Call Interface (EXCI) to access CICS

    Mainframe operating systems and management
    Roadmap to mainframe application modernization
    Improve CICS Web services security and handle Web transaction requests
    Coding a simple mainframe cryptography program
    How is CICS prepared for future IT market demands?
    Why IBM should listen to Neon Software, customers on zPrime
    Aussie financial firms dump Unix, Windows for Linux on the mainframe
    Using cryptography on the mainframe: An amateur's guide
    How mainframes fit into cloud computing
    IBM z/OS 1.11 preview: New features and functions
    Neon Software CEO rejects IBM warnings on mainframe licensing issues due to zPrime

    RELATED GLOSSARY TERMS
    Terms from Whatis.com − the technology online dictionary
    epoch  (SearchDataCenter.com)
    ISPF  (SearchDataCenter.com)
    job  (SearchDataCenter.com)
    Job Entry Subsystem  (SearchDataCenter.com)
    job scheduler  (SearchDataCenter.com)
    job step  (SearchDataCenter.com)
    MVS  (SearchDataCenter.com)
    P/390  (SearchDataCenter.com)
    Remote Job Entry  (SearchDataCenter.com)
    z/OS  (SearchDataCenter.com)

    RELATED RESOURCES
    2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
    Search Bitpipe.com for the latest white papers and business webcasts
    Whatis.com, the online computer dictionary

    DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



  • White Papers - Data Center Networking

    The Intel IT Technology Center - Power, Performance and Mobility Solutions

    HomeNewsTopicsITKnowledge ExchangeTipsBlogsMultimediaWhite PapersEvents
    About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
    SEARCH 
    TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

    TechTarget Corporate Web Site  |  Media Kits  |  Site Map




    All Rights Reserved, Copyright 2005 - 2009, TechTarget | Read our Privacy Policy
      TechTarget - The IT Media ROI Experts