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
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 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.
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
  • IBM TPF
  • IBM VMMON

MXG Views

MXG views are SQL views that are created automatically by the staging transformations for MXG adapters.
MXG views are also created by the Aggregation transformation for simple aggregations that are based on staged tables from the same adapters in the preceding list. One MXG view is created for each of these staged tables and simple aggregation tables. The MXG views are stored in the same SAS library in which their dependent SAS tables are stored.
Each MXG view shows a SAS IT Resource Management table and the variables for that table in a structure that is equivalent to an MXG data set. Thus, these views enable experienced MXG programmers to use SAS IT Resource Management tables in MXG reporting jobs as if the tables had been created by MXG.
For example, the staged table STAGE.XTY70 is accompanied by an MXG view called STAGE.TYPE70. Moreover, if a simple aggregation is built from a staged table, then an MXG view called SIMPLE.TYPE70 is created for the SIMPLE.XTY70 table.

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. However, 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. The IT Resource Management shift formula’s definition can be changed to any valid SAS expression, or set of DATASTEP statements.

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 the SAS IT Resource Management CPMISC PDS on z/OS, or the misc folder on UNIX, or the sasmisc folder on Windows. 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, no ASUMUOW observations (or records) are written 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 do the following:
  1. Copy the member EXITMON6 to your MXGUSER.SRCLIB, and follow the instructions therein to assemble and install the MXG INFILE exit "TMON". This action permits both compressed and uncompressed records to be processed without intervention.
  2. Copy the member IMACTMO2 to your MXGUSER.SRCLIB. Modify it to remove the comment from the three lines of code as described therein. This change causes the INFILE statement to use the TMON exit described in the preceding step.
    Alternatively, the same three lines of code could be specified in the IMACKEEP member instead.
Complete the following customizations in MXG in order to process data for TMON/CICS versions 8.0, 9.0, 1.0 and 1.1:
  1. EXITMON6 - If you are using compressed TMON data, then modify and run EXITMON6 by following the instructions that are contained within EXITMON6.
  2. IMACMONI - 1) Tailor IMACMONI by following the instructions within the member.
Complete the following customizations in MXG in order to process data for TMON/CICS ESA version 1.3 and later:
  1. EXITMON6 - If you are using compressed TMON data, then modify and run EXITMON6 by following the instructions contained within EXITMON6.
  2. IMACTMON - 1) Tailor IMACTMON by following the instructions within the member.
You can also complete the following customizations to process TMON2CIC data with MXG:
  1. Run the job <prefix>.BAMISC(TMONEXIT) and put the module in <prefix>.LIBRARY.
  2. Update IMACKEEP by following the instructions in the EXITMON6 member of MXG sourclib. Put the following statements in IMACKEEP:
    MACRO _TMDB;
    INFILE TMDBIN   TMON STOPOVER LENGTH=LENGTH COL=COL END=END;
    %
  3. 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 filesystem path (MY.DATAMART) or a root directory in the UFS 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.