Working with MXG Code to Stage Data

About MXG Adapters

Raw data sources that are supported through MXG, such as z/OS data sources, might require that you customize some of the MXG code. These changes might be required in order to stage the data appropriately for the MXG adapters that SAS IT Resource Management provides.
SAS IT Resource Management uses the following environment variables to locate the MXG sourclib and format data sets:
  • MXGSRC= Location of the MXG Sourclib library
  • MXGFMT= Location of the MXG format library
Tip
In order to be processed correctly, your raw data sources might need to be stored with specific attributes, such as the data control block (DCB) parameter. For best results, review the staging parameters and the defaults that apply to your adapter. For more information, see Appendix 3, “Staging Parameters”.
On z/OS, these configuration settings are specified in the COMMON member of the <hlq>CONFIG PDS, using the SET SAS system option. To override the physical locations to which these environment variables refer, you must manually add one of the following options to the SITE member of your high-level-qualifier.CONFIG data set:
SET='MXGSRC (<custom> <sourclib>)'
SET=’MXGFMT <formatlib>'
In the preceding code fragments, the following definitions apply:
custom
is the path to your MXG custom source library. It is referred to as MXGUSER.SRCLIB.
sourclib
is the path to your MXG source library. It is referred to as MXG.SRCLIB.
formatlib
is the path to your MXG format library. It is referred to as MXG.FMTLIB.
Tip
The MXG source and format libraries must be specified using a SAS configuration file as noted above, and not via JCL or other external allocation method. Otherwise, the staging job fails with the following message:
ERROR: MXGFMT or MXGSRC configuration settings have been overridden by the pre-allocation of LIBRARY or SOURCLIB datasets. These allocations must be removed.
For information about configuration files or the SET SAS system option, see the Operating Environment Specific Information (that is, the Companion) for your SAS installation at http://support.sas.com/documentation/onlinedoc/base/index.html.
SAS IT Resource Management supports the following MXG adapters:
  • IBM DCOLLECT
  • IBM EREP
  • BMC Mainview IMS
  • DT Perf Sentry with MXG
  • IBM SMF
  • ASG TMON2CIC
  • ASG TMONDB2
  • ASG TMONDB2 V5
  • IBM TPF
  • IBM VMMON

IMACWORK and RMFINTRV Customizations Relevant to the RMF Domain Category of the SMF Adapter

The IMACWORK and RMFINTRV members define the service classes (for those running in goal mode) or performance groups (for those not running in goal mode) that make up the workloads at your site. As with all MXG customizations, copy the member that you want to modify from MXG.SRCLIB to MXGUSER.SRCLIB. Edit these copies according to the instructions or comments therein. Both members contain important notes about the mixing of service classes with reporting classes (in goal mode) and control performance groups with report performance groups (not in goal mode). A good job of customizing these members ensures useful information in the XRMFWKL, XRMFWKP, and XRMFINT tables.
Notice that the RMFINTRV member permits the specification of more workloads than the IMACWORK member permits by itself. Depending on your requirements, you could edit just one, or both, of these members.
If you want to simultaneously process SMF data from multiple machines and if these machines have defined different RMF intervals, then you must also review the setting of the INTERVAL= macro parameter of the %VMXGRMFI macro in the RMFINTRV member. The value that you choose for this parameter must be an interval into which all RMF intervals that are being processed divide evenly, without a remainder. For example, if the RMF intervals of two machines are 10 minutes and 15 minutes, use INTERVAL=HALFHOUR. Review the comments in the RMFINTRV member for all possible values for INTERVAL=. Even if you choose to process the data from different machines in different executions of the same staging job, subsequent analysis of the data is more effective if both sets of the data are processed with the same value for the INTERVAL= parameter.

IMACSHFT Customizations Relevant to All Domain Categories of the SMF Adapter

The IMACSHFT member is used to define your shift patterns. By default, the SHIFT variable in the IT Resource Management staged tables is populated from a formula that is supplied with IT Resource Management, and is not propagated from MXG. IT Resource Management shift formula’s definition can be changed to any valid SAS expression, or set of DATASTEP statements.
Note: The SHIFT variable in MXG is automatically preserved in a column called SHIFT_MXG. If you want to use the value that is in SHIFT_MXG as your SHIFT variable, assign it to the SHIFT column. You can do so by using this ASSIGNMENT statement:
SHIFT=SHIFT_MXG;

Customizations Relevant to the Jobs Domain Category of the SMF Adapter

IMACSPIN Customizations

The IMACSPIN member is used to specify the number of days for which incomplete jobs are retained in SPIN data sets. They are retained until either the jobs become complete or the time specified in the IMACSPIN member elapses. The default value is zero.
For information, see the comments in the IMACSPIN member.

IMACINTV Customizations

To enable the collection of SMF interval data, you must first ensure that your system is configured to generate the SMF interval accounting records. Work with your systems programming team to determine the changes that might be required in MVS system data set, SYS1.PARMLIB(SMFPRMxx).
When that change is made, you must also modify the IMACINTV MXG member. The default is set so that no TYPE30_V (SMF interval accounting) records are written to SAS data sets. You must copy IMACINTV from MXG.SRCLIB to MXGUSER.SRCLIB and remove the comments from around the OUTPUT statement, as described in the comments in the member.
Note: You can be selective about how many observations (or records) are written, by coding IF and THEN statements. The comments in the member contain examples.

Customizations Relevant to the CICS and DB2 Domain Categories of the SMF Adapter

IMACEXCL and UTILEXCL Customizations

The IMACEXCL member contains the original methods by which modifications to the CICS SMF type 110 record were supported in the MXG code that read them. These original methods have been superseded by the UTILEXCL member. The UTILEXCL member is the preferred method to dynamically create a new IMACEXCL member that is customized to support the actual SMF data being used at your site. The code is designed to run once, to generate the IMACEXCL member. You must then store that member in MXGUSER.SRCLIB to enable the SMF records to be decoded correctly into the SAS data sets.

ASUMCICX Customizations

SAS IT Resource Management has added response time counters to the summarized CICS table that MXG generates by default. To implement this feature, copy the ASUMCICX member from the ITRM.CPMISC pds to your MXGUSER.SRCLIB. Failure to do this causes warning messages to be issued about missing variables.
Note: SAS IT Resource Management is adapted to include the new metrics that the ASUMCICX member creates. This MXG member is stored in a location that is based on the operating environment.
Windows Specifics: SASHome\SASFoundation\9.4\itmsmvadata\sasmisc
UNIX Specifics: SASHOME/SASFoundation/9.4/misc
z/OS Specifics: &prefix.ITRM.CPMISC
Before you use the ASUMCICX member, you must run the UTILEXCL MXG job. This job creates and implements the IMACEXCL member that is customized for your site. Documentation for ASUMCICX and UTILEXCL can be found inside each member.

IMACUOW Customizations

By default, ASUMCICX and ASUMUOW write zero observations to the SAS data set. To process unit-of-work data, you must modify the IMACUOW MXG member. Copy it to your MXGUSER.SRCLIB and comment out (or delete) the first definition of the two macros, _NOOBS and _YESOBS. Then remove the comment indicator from the second definition, so that the macros are defined as follows:
MACRO _NOOBS   %
MACRO _YESOBS  %
In addition, if you have MQ series data that you want to add to the CICS and DB2 unit-of-work process, modify the code as instructed in IMACUOW to remove the comment indicator from the following statement:
%LET MXGMQADD=YES;

IMACUOWT Customizations

By default, no ASUMUOWT observations (or records) are written to the SAS data set. To process unit-of-work data from ASG TMON for CICS and SMF DB2, you must modify the IMACUOWT MXG member. Copy it to your MXGUSER.SRCLIB and comment out (or delete) the first definition of the two macros, _NOOBS and _YESOBS. Then remove the comment indicator from the second definition, so that the macros are defined as follows:
MACRO _NOOBS   % 
MACRO _YESOBS  % 

Customizations Relevant to the Jobs Domain Category of the CA TMS Adapter

By default, there is no single DATETIME variable that represents the date and time of each observation. Copy members IMACTMS5 and EXTMSDSN to your MXGUSER.SRCLIB. In the IMACTMS5 member, add the variable DATETIME to both the _KTMSDSN and _KTMSTMS macros by using the following code:
MACRO _KTMSDSN DATETIME % 
MACRO _KTMSTMS DATETIME %  
In the EXTMSDSN member, insert the following line of code in front of the OUTPUT statement:
RETAIN DATETIME “&SYSDATE:&SYSTIME"DT;

Customizations Relevant to the ASG TMON2CIC Adapter

If you are processing compressed TMON CICS records, you must perform the following steps:
  1. Copy the member EXITMON6 to your MXGUSER.SRCLIB, and follow the instructions therein to assemble and install the MXG INFILE exit "TMON". When specified in the INFILE statement, it permits both compressed and uncompressed records to be processed without intervention.
  2. Copy the member IMACTMO2 to your MXGUSER.SRCLIB. As described therein, modify it to remove the comments from these three lines of code:
         MACRO _MONI;
           INFILE MONICICS TMON STOPOVER LENGTH=LENGTH COL=COL;
         %
    
    This change causes the INFILE statement to use the TMON exit described in the preceding step.
  3. Run the staging job.

Customizations Relevant to the ASG TMONDB2 and ASG TMONDB2 V5 Adapters

If you are processing compressed TMON DB2 records for either of these adapters, you must perform the following steps:
  1. Copy the member EXITMON6 to your MXGUSER.SRCLIB, and follow the instructions therein to assemble and install the MXG INFILE exit "TMON". When specified in the INFILE statement, it permits both compressed and uncompressed records to be processed without intervention.
    • If you are running a version of ASG TMON DB2 prior to V5, copy the member IMACTMDB to your MXGUSER.SRCLIB. As described therein, modify it to remove the comments from these three lines of code:
           MACRO _TMDB;
             INFILE TMDBIN TMON STOPOVER LENGTH=LENGTH COL=COL END=END;
           %
      
      This change causes the INFILE statement to use the TMON exit that is described in the preceding step.
    • If you are running version 5 (or higher) of ASG TMON DB2, copy the member IMACTMD2 to your MXGUSER.SRCLIB. Add the following three lines to the bottom of the member:
            MACRO _TMD2;
             INFILE TMD2IN TMON STOPOVER LENGTH=LENGTH COL=COL; 
           %
      
      This change causes the INFILE statement to use the TMON exit that is described in the preceding step.
  2. Run the staging job.

Specify Spin Libraries for ASG TMON2CIC and IBM SMF

The ASG TMON2CIC and IBM SMF adapters require that you specify a spin library for spin data. The staging transformations for these adapters create and register a separate spin library. Any existing data is moved to the new spin library as part of the installation, update, or migration process.
For the ASG TMON2CIC and IBM SMF adapters, a spin library must be created. You can create this library on the Spin Library tab of the staging transformation properties. On this tab, you can specify various parameters of the spin library or accept the default values. The spin library is then created only after you open the Spin Library tab and select OK. (If you are using the Adapter Setup wizard to specify the ASG TMON2CIC and IBM SMF adapter, the wizard creates the spin library for you.)
To specify a spin library for ASG TMON2CIC or IBM SMF, perform the following steps:
  1. From the Properties window of an ASG TMON2CIC or IBM SMF staging transformation, click the Spin Library tab.
    Staging Transformation Properties: Spin Library Tab
    Staging Transformation Properties: Spin Library Tab
  2. Confirm that the IT data mart is correct for the current job. The value in this field cannot be changed.
  3. Specify the Name and Description of the spin library. SAS IT Resource Management generates default values for these parameters that include a standard naming convention for the library name (<adapter name> + Spin + <unique number>). For best results, if you modify the library name, use a standard naming convention that implements unique, identifiable names for all spin libraries that you register. A name value is required and a description is optional.
  4. Confirm the values for the Server and Libref fields for the IT data mart and spin library. The values in these fields cannot be changed.
  5. Enter the value for the Path Specification field for the metadata path that stores the spin library. SAS IT Resource Management generates the default path <adapter name> + Spin + <unique number>. You can accept the default path, enter a new path, or click Browse to select a path. A value is required in this field.
    Note: Browse is disabled when the selected application server is running on a machine using the z/OS operating system. When entering a z/OS path manually, you can use either a prefix for a traditional z/OS file system path (MY.DATAMART) or a root directory in the zFS hierarchical file system (/u/myname/datamart).
  6. If you are creating and registering libraries on z/OS, specify the following values:
    • file system device
    • the number of cylinders to use as the primary and secondary space allocation for the data set
    • the number of volumes to use when allocating space
    A value is required for these parameters only if you are working with z/OS.
  7. Click OK. The staging transformation creates the spin library as specified.

Limit IBM SMF Records

You might want to limit the IBM SMF records that are processed into an aggregation table to specific systems. To do so, you can use an aggregation filter. However, the disadvantage of using an aggregation filter is that the staging code is unnecessarily processing system data that will not be aggregated. In addition, this requires that a filter be set on each and every SMF aggregation. It is more efficient to filter data during the staging job processing.
To limit the IBM SMF records in order to process only specific systems in SAS IT Resource Management during a staging job process, add an IF statement in the IMACFILE MXG member. For example, to process only those records from a 'PROD' and 'TEST' system, perform the following steps:
  1. Place a copy of the IMACFILE MXG SOURCLIB member into your user MXG SOURCLIB.
  2. Modify the user IMACFILE MXG SOURCLIB member with the following SAS statement: IF SYSTEM IN ('PROD','TEST'); /*Only process records for these systems */where the systems for which you want to process IBM SMF records are listed in the IN clause.
For more examples or information about coding the IF statement, see the documentation inside the IMACFILE MXG SOURCLIB member.
Note: IMACFILE is a specific exit point taken by all SMF records, immediately after the SMF header is read. This exit point can be used if you want to bypass the processing of a record based on the machine that produced it.