IAMCMON - Storage monitor
IAMCMON is a utility program that provides reports on the amount of virtual storage being used for open IAM files in the requested non-swappable address spaces. It it intended to be utilized as a tool that is periodically run so that users can monitor the storage being used within the long running address spaces to determine if there is a potential issue with exhausting the virtual storage resources. There are two primary areas that IAM uses to process each data set that can use significant amounts of virtual storage which are storage for the index, and storage for the buffers. The storage areas being reported on include:
- Virtual storage within the region that contains the IAM and VSAM control blocks. This area may also contain the IAM buffers and the index.
- Virtual storage within the IAM data space if one is being used for the index to the open IAM files.
- Virtual storage in 64-bit addressable area which can contain the index and can also contain data buffers.
This information can help adjust the IAM Global Options for IAM buffers and for what virtual storage to use for the index. It can help find the data sets that can benefit from using the PRO format to reduce the virtual storage used for the index.
The IAMCMON program enables the periodic creation of reports on the amount of virtual storage being used by IAM data sets in long-running tasks such as CICS and IAM/RLS. It can determine if there is a potential issue with exhausting the virtual storage resources and can help in optimizing various environmental parameters.
Monitor function
The MONITOR command provides control over the data that IAMCMON will report on. Multiple MONITOR commands can be provided, each with a different specification. The MONITOR command specifies via the JOBNAME parameter the address space to be reported on. With only the job name specified, the summary report is produced showing the amount of storage used to process all of the currently open IAM data sets.
The LISTDSNS keyword provides additional detail of the amount of storage being used for each data set, as identified by the data set name. This additional data helps one to spot what files are using the most storage, and may be an indicator of which data sets need to be reorganized, and perhaps converted to the PRO format to reduce storage usage by the virtual storage for the index areas.
There are three additional keywords that enable IAMCMON to put out a warning message when the storage usage within the specified area exceeds the specified amount. These are MAXAS for storage within the address space, MAXIX for storage within the data space when used for the index, and MAX64 for 64-bit virtual. For each keyword one would specify the limit above which messages will be produced in megabytes. For example, specifying MAXIX=1536 indicates to put our a warning message when use of storage within the data (index) space exceeds 1,536 megabytes which is 75% of the total maximum that can be used.That will indicate that either one or more data sets needs to be reorganized or that the index storage should be shifted to 64-bit virtual where with the appropriate MEMLIMIT set can exceed the 2 gigabyte data space limit.
The amount of virtual storage being used could be increasing due to the index growing caused by insert activity. An action that could be taken in that circumstance is to reorganize the file that is causing the increase in virtual storage to reduce the index size by eliminating the use of the overflow area.
Monitor command
The IAMCMON program has one function, the MONITOR function as described above. Each MONITOR control card can specify one non-swappable address space to produce a report. Multiple MONITOR control cards can be specified within the same execution of the program.
The following table describes the MONITOR command operands:
Keyword | Description |
---|---|
JOBNAME | (Required) Specifies the name of the non-swappable address space that the storage monitor report is requested for. |
LISTDSN | (Optional) Provides a list of each open IAM data set with the amount of storage being used for that data set. This includes the storage used for the IAM control blocks, buffers and index. This information is also included in the IAMINFO reports and in the IAM SMF record. |
MAXAS= | (Optional) Specifies when storage use within the 31-bit portion of the address space by IAM exceeds the indicated limit, a warning message will be produced. The value is specified in megabyte increments. For example, MAXAS=1024 indicates a warning message is produced when IAM storage usage exceeds 1,024 megabytes (or 1 gigabyte) in the address space. |
MAXIX= | (Optional) Specifies when storage use within the z/OS data space when being used for the index space by IAM exceeds the indicated limit, a warning message will be produced. The value is specified in megabyte increments. For example, MAXIX=1536 indicates a warning message is produced when IAM storage usage exceeds 1,536 megabytes (or 1.5 gigabytes) in the data / index space. |
MAX64= | (Optional) Specifies when storage use within the 64-bit virtual portion of the address space by IAM exceeds the indicated limit, a warning message will be produced. The value is specified in megabyte increments. For example, MAX64=4096 indicates a warning message is produced when IAM storage usage exceeds 4,096 megabytes (or 4 gigabytes) in the data / index space. |
JCL requirements
IAMCMON has very simple JCL requirements. This includes the following JCL cards:
- EXEC card that specifies PGM=IAMCMON.
- STEPLIB card is needed if the IAM load library is not in link list.
- SYSPRINT DD card specifying SYSOUT for the report generated.
- SYSIN DD card specifying the control card input.
An example of JCL is shown below:
//********************************************************************
//*
//* MONITOR JOBS FOR IAM STORAGE USAGE
//*
//********************************************************************
//CMON EXEC PGM=IAMCMON,REGION=2M
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
MONITOR JOBNAME=IAMRLSG1,LISTDSNS,MAX64=2
MONITOR JOBNAME=CICSBMRK,LISTDSNS
/*
Example Report
An example of the report produced by IAMCMON, with notations to explain what is included in the report.
0COMMAND: MONITOR JOBNAME=IAMRLSA1,LISTDSNS,MAX64=2
JOBNAME IAMRLSA1 FOUND
PROCESSING JOBNAME IAMRLSA1 MEMLIMIT VALUE = 4GB SOURCE OF MEMLIMIT = JCL
DSN A/S(KB) IXSPACE(KB) 64BIT(MB)
-------------------------------------------- ----------- ----------- -----------
CPPRAC.IVTK1 24 0 3
IAMRLSA1 STORAGE USAGE SUMMARY
ADDRESS SPACE USED - 24KB / 0.1MB
INDEXSPACE ALLOCATED - 2048MB USED - 0KB / 0.0MB
64-BIT ALLOCATED - 128MB USED - 1024KB / 1.0MB