Monitor execution

The ENQ monitor can be started by either starting a procedure or submitting a batch job. This job should be considered as a non-ending job that is TIME=1440 or TIME=NONLIMIT.

Running the monitor on previous releases requires the systems programmer to ensure that the ENQ monitor is defined to run at the highest dispatch priority. As of z/OS® V1R10, the ENQ monitor automatically runs at the right dispatching priority by joining a GRS Dependent Enclave. The enclave makes the monitor run as an extension of the GRS address space. This results in CPU time accumulated by the monitor to be added to the GRS address space's CPU time. Not running the monitor at the highest dispatching priority can affect ENQ/DEQ processing.

You should be aware that the monitor elongates the path length of every ENQ, DEQ, RESERVE, and ISGENQ. The elongation was substantially reduced in z/OS V1R10, but it still might not be acceptable. Before running the monitor in production or for a long time, make sure that you understand the impact of the elongation. Running the SYS1.SAMPLIB(ISGNQRSP) program with or without the active monitor and doing comparisons on the response times can help the user to make a decision.

Figure 1. JCL to Run the Monitor
//* Function: Run this job to start ENQ Monitor before starting
//*           ENQ Monitor ISPF interface or using the modify
//*           command.
//*
//* Operation: This JCL can be copied to the SYS1.PROCLIB and issue
//*            'S ISGRUNAU' from the MVS console to start the ENQ
//*            Monitor.
//*
//* Suggested modifications:
//*    1. Uncomment //*OUTPUTX if hardcopy output is needed.
//*    2. Modify //OUTPUTX DD DSN=USERID.AUDIT>OUTX,DISP=SHR to
//*       a correct pre-allocated dataset.
//*
//*       When allocates the dataset, it has to be in the following
//*       format:
//*              Organization  . . . : PS
//*              Record format . . . : F
//*              Record length . . . : 3892
//*              Block size  . . . . : 3892
//*
//* Recovery Operations:  None
//*
//* Distribution Library:  ASAMPLIB
//JOBNAME  JOB CLASS=A,MSGCLASS=A,TIME=NOLIMIT
//*
//*  JOB TO START THE MONITOR
//*
//*
//JOBLIB DD DSN=SYS1.LINKLIB,DISP=SHR
//STEP001 EXEC PGM=ISGAUDIT,PARM='DSP=32'
//OUTPUT1 DD DSN=USERID.AUDIT.OUT1,DISP=SHR
//OUTPUT2 DD DSN=USERID.AUDIT.OUT2,DISP=SHR
//*OUTPUT1 DD DUMMY
//*OUTPUT2 DD DUMMY
//SYSUDUMP DD SYSOUT=*

The optional keyword DSP on the PARM field can be used to specify the desired size of the dataspace in MB (megabytes). DSP=nnn which can range from 1 to 999. The default dataspace size is 32 MB.

The two output sequential data sets must be different data sets or can be DUMMY data sets. If both data sets are DUMMY, data is collected in storage. When one data set becomes full, the monitor automatically switches to the alternate. If all specified data sets are full, the monitor terminates..

When the monitor is restarted, it will append the new data to the end of OUTPUT1 data set. It is possible to process the data collected while the monitor is active. This can be done either by switching to the alternate data set with the MODIFY option SW command (see Monitor control) or by selecting the data to process with the DATE keyword with the TO-TIME less than the actual time (see Report programs parameters).

If the events' rate causes loss of data, consider using a 3990-3 DASD FAST WRITE facility. Data can be lost if an unexpected error occurs during the process of copying information to the ENQ Monitor's address space. The MODIFY option L command and ISPF main panel display the number of lost events if loss of data occurs.

You can invoke an ISPF application to display and print the data saved in the dataspace. For additional information see Starting the monitor and Monitor control.

When the dataspace is full, the monitor stops collecting data. The ISPF application can still display the dataspace information.

If the monitor is started as a procedure, it cannot be canceled or forced, it can only be stopped. If the monitor is submitted as a batch job, it can be cancelled, stopped, or forced.