Automating Historical Data Extraction
Sample Automation of History Data Extraction
The following table lists the SAMPLIB members:
Member | Description |
|---|---|
BBMSJOFL | Example JCL catalogued procedure, triggered by automation to execute a started task to run BBM9MD73, the history extract utility Copy this member to the PROCLIB where system catalog procedures are stored, and rename as necessary to meet your installation naming standards. |
BBMSRDIS | Example REXX exec to send an email message containing the output messages from BBM9MD73 and an indication of success or failure of the history extract step |
BBMSRNOT | Example REXX exec to send a multi-line email message via TRANSMIT TSO command, using CSSSMTP message headers |
Use the following BMC AMI Ops Automation rule to trigger a START command for the started task to extract history data whenever a PAS issues the BBMEA054I message:
GROUPID('MVIHIST') DESC('BMC SAMPLE FOR HISTORY DATA EXTRACTION') +
CODE('MV') MUSER('MVTSOID') MDATE('18/12/31') MTIME('08:28'))+
SELECT(TEXTID('BBMEA054I') TEXT('BBMEA054I OFFLOAD *') ORIGIN('MSG'))+
ACTION(DISPLAY(Y) +
COMMAND('S BBMSJOFL,TYPE=&WORD4.,IRSID=&WORD5.,HDSN=&WORD6'))
Add the event type MSG rule to a Rule Set enabled for a BMC AMI Ops Automation PAS running on the same LPAR on which the WTO is issued. Give this MSG rule an action of an MVS command as follows, where procname is the name of the started task procedure containing the BBMSJOFL JCL:
S procname,TYPE=&WORD4.,IRSID=&WORD5.,HDSN=&WORD6
When the rule is enabled, it issues the START command whenever any PAS on the system issues message BBMEA054I. The rule does the following:
- Parses words from the message
- Formats a START command, inserting the words as parameter values in the catalogued procedure
- Issues the command to start the BBMSJOFL procedure
For more information about BMC AMI Ops Automation Rules, see Using Rules with BMC AMI Ops Automation.
Example
If a PAS issues the following WTO message, the BMC AMI Ops Automation rule issues the START command, inserting the TYPE, IRSID, and HDSN fields of the message into the parameter values as follows:
WTO Message: BBMEA054I Offload BBMVMVS MVSPAS 0 BMC.MV.SYSA.MVMVS.HISTDS01
START Command: S BBMSJOFL,TYPE=MVSPAS,IRSID=0,HDSN=BMC.MV.SYSA.MVMVS.HISTDS01
The BBMSJOFL contains the following steps:
- OFFLOAD - runs the BBM9MD73 History Extract utility.
- BAD - conditionally executes if an ABEND occurs or when the OFFLOAD step returns a condition code greater than 8.
- GOOD - conditionally executes if the BAD step is not executed (ELSE branch).
The BAD and GOOD steps in the JCL execute TSO batch job steps that call sample REXX execs BBMSRDIS and BBMSRDOT to send email messages to inform the recipient of the job success or failure.
You can enhance the GOOD (or ELSE) branch as follows:
- Include a SORT step to filter and reformat the extracted data.
- Include the data transformation utility to reformat the data suitable for off-mainframe format.
- Transfer (for example, via SFTP) the filtered and reformatted data to a distributed systems server for off-mainframe analysis of the data. This automates the data reduction and delivery of history data to your analytics products as soon as the BMC AMI Ops history data becomes available.