The monitoring control table (mct) – IBM SC34-6814-04 User Manual

Page 769

Advertising
background image

The monitoring control table (MCT)

You can use the monitoring control table (MCT):

v

To tell CICS about the EMPs that are invoked by your application programs and
about the data that is to be collected at these points. The DFHMCT TYPE=EMP
macro can do this.

v

To tell CICS that you want specific system-defined performance data not to be
recorded during a particular CICS run. The DFHMCT TYPE=RECORD macro can
do this.

Full details of the DFHMCT macros are provided in the CICS Resource Definition
Guide
, and you should refer to this when reading the following sections.

IDENTIFICATION DIVISION.

PROGRAM-ID. APPLNAME.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
77

APPLICATION-NAME-PTR

POINTER.

77

MENU-APPLICATION-NAME

PIC X(4)

VALUE ’MENU’.

77

PAYROLL-APPLICATION-NAME

PIC X(8)

VALUE ’PAYROLL ’.

77

DFHAPPL-NAME

PIC X(8)

VALUE ’DFHAPPL ’.

77

DFHAPPL-DATA2

PIC S9(8)

COMP

VALUE +0.

77

BLANKS

PIC X

VALUE SPACE.

*

LINKAGE SECTION.
77

LS-APPLICATION-NAME

PIC X(8).

*

PROCEDURE DIVISION.

*

Get storage for DFHAPPL data and set address
EXEC CICS GETMAIN FLENGTH(LENGTH OF LS-APPLICATION-NAME)

SET(APPLICATION-NAME-PTR) INITIMG(BLANKS)

END-EXEC.
SET ADDRESS OF LS-APPLICATION-NAME TO APPLICATION-NAME-PTR.

MOVE PAYROLL-APPLICATION-NAME TO LS-APPLICATION-NAME.

*

Invoke DFHAPPL EMP 2 to add the application name
EXEC CICS MONITOR ENTRYNAME(DFHAPPL-NAME) POINT(2)

DATA1(APPLICATION-NAME-PTR) DATA2(DFHAPPL-DATA2)
NOHANDLE

END-EXEC.

*

Re-use application data area for transaction ID
MOVE MENU-APPLICATION-NAME TO LS-APPLICATION-NAME.

*

Invoke DFHAPPL EMP 1 to add the transaction ID
EXEC CICS MONITOR ENTRYNAME(DFHAPPL-NAME) POINT(1)

DATA1(APPLICATION-NAME-PTR) DATA2(DFHAPPL-DATA2)
NOHANDLE

END-EXEC.

SET ADDRESS OF LS-APPLICATION-NAME TO NULL.

EXEC CICS FREEMAIN DATAPOINTER(APPLICATION-NAME-PTR)

NOHANDLE

END-EXEC.

EXEC CICS RETURN END-EXEC.

Figure 103. EXEC CICS MONITOR commands for DFHAPPL EMPs (COBOL)

Chapter 28. CICS monitoring

747

Advertising