ATTACH (attaching a method)

The ATTACH command starts a method running in the CICS® systems identified by the specified context and scope values.

The format of the ATTACH command is:
ATTACH method context scope
where:
method
Is the ID of a CICSPlex SM method.
context
Is the name of a CMAS or CICSplex.
scope
Is the name of a CICSplex, CICS system group, or CICS system.

For a list of valid responses to this command, see Running a method.

Unlike the START command, which merely starts a CICS transaction within a CMAS, ATTACH crosses the boundary between a CMAS and a local MAS. (These methods may run in the CMAS, a different address space, or even a different processor in the CICSplex).

Figure 1 is an example of the display for a completed attached task that ran within a single CMAS or MAS.
Figure 1. Attached task display for a single CMAS or MAS
COD1 CICSPlex SM Debugger
CMD=>                                                            Scroll=> PAGE
Enter END to exit or ENTER to view results.
Status for ATTACHed method  XQCQ
 
       Methods status:  Method completed.
       XLCI return description:  OK
       Method's RESPONSE was:    OK
       Method's REASON was:
 
       CONTEXT:  CVMCTSO1   SCOPE:  CSYSGRP1   REGION:  CSYSGRP1
 
       Unit of work
          SYSID:  TEST     USERID:  DEVOPER  TCB  00452160
          Major Object:  00   Component Id:  73
 
 
       The method executed in a single MAS so all information
       appears in the fields of the MAL.
 
Figure 2 is an example of the display for a completed attached task that either ran in multiple MASs, or ran multiple times in a CMAS.
Figure 2. Attached task display for multiple CMASs or MASs
COD1 CICSPlex SM Debugger
CMD=>                                                            Scroll=> PAGE
Enter END to exit or ENTER to view results.
Status for ATTACHed method  XQCQ
 
       Methods status:  Method completed.
       XLCI return description:  OK
       Method's RESPONSE was:    OK
       Method's REASON was:
 
       CONTEXT:  CVMCTSO1   SCOPE:  CSYSGRP1   REGION:  CSYSGRP1
 
       Unit of work
          SYSID:  TEST     USERID:  DEVOPER  TCB  00452160
          Major Object:  00   Component Id:  74
 
       The method executed in multiple MAS so a queue of OUT records
       was created.
 
       OUTQUE QUEUE ID:  A4957FBD B3E11932
                    Records :  0000013  Record Length:  0000018
 
When you press Enter, each of the MALs that ran in each region is reconstructed and displayed individually, as shown in Figure 3.
Figure 3. MAL display for a specific CICS region
COD1 CICSPlex SM Debugger
CMD=>                                                            Scroll=> PAGE
NEXT/PREV to browse CICS region MALS. END=Exit.
MAL for CICS Region:CICSSY01
IN
   *ENM FUNCTION( CREQUE )
    CHR DEBUG(          )
    PTR ECB( 00000000 )
   *CMP MAJOR_OBJECT( KNL )
   *ENM TYPE( WORK )
   *SDT DELETE( TRUE  )
OUT
   *ENM RESPONSE( OK )
   *ENM REASON(                    )
   *ETK QTOKEN( A4957FC53998FB31 )
 
Note also that the region the MAL ran in is shown on the header line for the display. You can use the NEXT (PF5) and PREV (PF4) keys to browse backwards and forwards between the regions. END (PF3) returns you to the attached task display.


eyus1d0.html | Timestamp icon Last updated: Monday, 5 June 2017