recovery, units of recovery, work, units of, resolving, recovering manually, unit of recovery, units of recovery in CICS, displaying, displaying in-doubt, RESOLVE INDOUBT command, free locked resources, DISPLAY CONN, WebSphere MQ commands, RESOLVE INDOUBT, CSQM201 message, NID (network ID), tokens, finding start RBA with, log print utility (CSQ1LOGP), CSQ1LOGP (log print utility)" /> How to resolve CICS units of recovery manually

 

How to resolve CICS units of recovery manually

If the adapter ends abnormally, CICS and WebSphere MQ build in-doubt lists either dynamically or during restart, depending on which subsystem caused the abend.

Note:
If you use the DFH$INDB sample program to show units of work, you might find that it does not always show WebSphere MQ UOWs correctly.

When CICS connects to WebSphere MQ, there might be one or more units of recovery that have not been resolved.

One of the following messages is sent to the console:

  • CSQC404E

  • CSQC405E

  • CSQC406E

  • CSQC407E

  • CSQC408I

For details of what these messages mean, see the WebSphere MQ for z/OS Messages and Codes manual.

CICS retains details of units of recovery that were not resolved during connection startup. An entry is purged when it no longer appears on the list presented by WebSphere MQ.

Any units of recovery that CICS cannot resolve must be resolved manually using WebSphere MQ commands. This manual procedure is rarely used within an installation, because it is required only where operational errors or software problems have prevented automatic resolution. Any inconsistencies found during in-doubt resolution must be investigated.

To resolve the units of recovery:

  1. Obtain a list of the units of recovery from WebSphere MQ using the following command:

    +CSQ1 DISPLAY CONN(*) WHERE(UOWSTATE EQ UNRESOLVED)

    You receive the following message:

    CSQM201I +CSQ1 CSQMDRTC  DISPLAY CONN DETAILS 
    CONN(BC85772CBE3E0001)                       
    EXTCONN(C3E2D8C3C7D9F0F94040404040404040)    
    TYPE(CONN)                                   
    CONNOPTS(                                    
     MQCNO_STANDARD_BINDING                      
     )                                           
    UOWLOGDA(2005-02-04)                         
    UOWLOGTI(10.17.44)                           
    UOWSTDA(2005-02-04)                          
    UOWSTTI(10.17.44)                            
    UOWSTATE(UNRESOLVED)                         
    NID(IYRCSQ1 .BC8571519B60222D)               
    EXTURID(BC8571519B60222D)                    
    QMURID(0000002BDA50)                         
    URTYPE(CICS)                                 
    USERID(MQTEST)                               
    APPLTAG(IYRCSQ1)                             
    ASID(0000)                                   
    APPLTYPE(CICS)                               
    TRANSID(GP02)                                
    TASKNO(0000096)                              
     END CONN DETAILS                   

    For CICS connections, the NID consists of the CICS applid and a unique number provided by CICS at the time the syncpoint log entries are written. This unique number is stored in records written to both the CICS system log and the WebSphere MQ log at syncpoint processing time. This value is referred to in CICS as the recovery token.

  2. Scan the CICS log for entries related to a particular unit of recovery.

    Look for a PREPARE record for the task-related installation where the recovery token field (JCSRMTKN) equals the value obtained from the network ID. The network ID is supplied by WebSphere MQ in the DISPLAY CONN command output.

    The PREPARE record in the CICS log for the units of recovery provides the CICS task number. All other entries on the log for this CICS task can be located using this number.

    We can use the CICS journal print utility DFHJUP when scanning the log. For details of using this program, see the CICS Operations and Utilities Guide.

  3. Scan the WebSphere MQ log for records with the NID related to a particular unit of recovery. Then use the URID from this record to obtain the rest of the log records for this unit of recovery.

    When scanning the WebSphere MQ log, note that the WebSphere MQ startup message CSQJ001I provides the start RBA for this session.

    The print log records program (CSQ1LOGP) can be used for that purpose.

  4. If we need to, do in-doubt resolution in WebSphere MQ.

    WebSphere MQ can be directed to take the recovery action for a unit of recovery using an WebSphere MQ RESOLVE INDOUBT command.

    For information about RESOLVE INDOUBT, see the WebSphere MQ Script (MQSC) Command Reference manual.

    To recover all threads associated with a specific connection-name, use the NID(*) option.

    The command produces one of the following messages showing whether the thread is committed or backed out:

    CSQV414I +CSQ1 THREAD network-id COMMIT SCHEDULED
    CSQV415I +CSQ1 THREAD network-id ABORT SCHEDULED

When performing in-doubt resolution, CICS and the adapter are not aware of the commands to WebSphere MQ to commit or back out units of recovery, because only WebSphere MQ resources are affected. However, CICS keeps details about the in-doubt threads that could not be resolved by WebSphere MQ. This information is purged either when the list presented is empty, or when the list does not include a unit of recovery of which CICS has details.