Creating automatic BBI-SS PAS log handling procedures
To set up a started task to print and reset the BBI-SS PAS journal log
Use member DLOGJCL and the following procedure to set up a started task to print and reset the BBI-SS PAS journal log:
In BBPARM member BBISSPxx, specify a started task name with the following statement:JRNLSTC=xxxxxxxx
xxxxxxxx is a one- to eight-character name of a started task that is used to print and reset the BBI-SS PAS journal logs. BBIDLOG is the default. The value that you enter must match the name of the started task that you add to your JES PROCLIB.
- Copy BBSAMP member DLOGJCL into your JES PROCLIB data set and rename the member to the value that you specified for JRNLSTC in BBISSPxx.
- Make the following changes to the JCL:
- In the PROC statement, change BBIDLOG to the name that you want to use for your journal log print and reset procedure.
- In the PROC statement, change the PREFIX parameter to the high-level qualifier that was used to load product libraries to DASD.
- (optional) To print the BBI-SS PAS journal log to a data set on disk or tape, add DCB=(RECFM=FBA,LRECL=121) to the BBIPRINT DD statement..Any suitable BLKSIZE is allowed.
The journal log print and reset procedure is ready for use. If the product is already running when this step is completed, the BBISSPxx parameter change does not take effect until the BBI-SS PAS is restarted.
To extract BBI-SS PAS journal log records to a CSV
You can extract selected archived BBI-SS PAS journal records into comma-separated values (CSV) format. You can then process the records using off-mainframe analytics tools, such as Excel or Splunk. To extract the records, perform the following steps:
- Copy and edit the BBSAMP member DLOGJCL (BBIDLOG proc), or modify the current proc specified in your BBPARM member BBISSPxx in the JRNLSTC= parameter as follows:
- Direct the BBIPRINT DD to a preallocated archive sequential data set. This step is required to issue LG1207I messages. If the BBIPRINT DD is directed to SYSOUT, the LG1207I message is not issued.
Add PARM=’&SSID’ to the end of the EXEC statement to pass the SSID of the relevant PAS to LGLOGP: //IEFPROC EXEC PGM=LGLOGP,PARM=’&SSID’
SSID is an optional parameter, but it is recommended. If you do not pass it to LGLOGP, it has a null value in the SSID column in the output CSV data set.
Modify the BBSAMP member JRNLBTCH as follows:
Parameter
Required
Description
SYSPROC DD
Yes
Data set where the JRNLCSV REXX program is located
DATAIN DD
Yes
Archive data set specified in the BBIPRINT DD of the modified DLOGJCL proc
DATAOUT DD
Yes
CSV output data set
SYSIN DD
Yes
Selection criteria for selecting messages from the BBI-SS PAS journal:
Selection Criterion
Description
FROM
Start date/time
Format is YYYYMMDD HH:MM:SS.
Example: 20190507 06:35:00
TO
End date/time
Format is YYYYMMDD HH:MM:SS.
Example: 20190508 06:35:00
ORIGIN
The origin of the event message, which is column 3 from the archive data set written to the BBIPRINT DD (see the sample of offloaded BBI-SS PAS journal data)
Wildcards are allowed. Multiple ORIGIN parameters are allowed.
MSGID
First space-delimited word of the message text
Wildcards are allowed. Multiple MSGID parameters are allowed.
Examples:
- If the message is: " EM0027I EXEC DALSTRT EID= 75273 ENDED ON 17-MAY-18 AT 00:00:00 ", then the MSGID is "EM0027I".
- If the message is: " DEKZCAT.LOGCOPY1.DS01, STARTRBA=0000000001311AD0B000,", then the MSGID is "DSNAME=DEKZCAT.LOGCOPY1.DS01,".
All selection criteria are required. The extraction process is terminated if a keyword is missing.
The input field for selection criteria is columns 1–72. You can enter selection criteria on multiple lines. For example:
FROM *
TO *
ORIGIN SW1C
MVSSYW
AAOSW81
MSGID I*
PM*For all selection criteria, an asterisk indicates any value.
To treat an asterisk as a literal, enclose it in single quotes. For example:
- MSGID * means all message IDs that starts with any character.
- MSGID '*'* means all message IDs that start with a literal asterisk.
If you do not enter a value for any of the selection criteria, or if you enter an asterisk (*), they have no filtering effect.
Selection Criterion
Description
FROM *
No lower date/time limit for extraction
TO *
No upper date/time limit for extraction
ORIGIN *
No origin filter for extraction
MSGID *
No message ID filter for extraction
You can use an asterisk as a wildcard for ORIGIN and MSGID. For example:
MSGID PM*,*2E,EM*I
- PM* = PM0010I,PM0137I
- *2E = CT1122E,IM9242E
- EM*I = EM0026I,EM0027I
- Copy the edited DLOGJCL and JRNLBTCH members to your JES PROCLIB data set. Rename them as necessary to meet your installation naming standards.
- Edit the BBISSPxx parameter JRNLSTC= to point to the edited DLOGJCL proc.
- Use your automation product to intercept message LG1207I, which is issued when a journal data set is archived, and trigger the edited JRNLBTCH Started Task. For example, you can use BMC AMI Ops Automation for z/OS to define a rule that intercepts the LG1207I message and trigger a START command as follows:
- Add an event-type MSG rule to an enabled rule set for BMC AMI Ops Automation for z/OS PAS running on the same LPAR from which the LG1207I message is issued with the following specifications:
- Selection criteria:
- Event type: MSG
- Text ID: LG1207I
- Any additional selection criteria based on your automation needs
- Actions:
- MVS command to start the proc created from the sample JRNLBTCH proc
- Selection criteria:
- Add an event-type MSG rule to an enabled rule set for BMC AMI Ops Automation for z/OS PAS running on the same LPAR from which the LG1207I message is issued with the following specifications:
- Any additional actions based on your automation needs
- Any additional actions based on your automation needs
- Save this rule to a rule set that will be enabled.
When the LG1207I message is issued, the rule issues a START command, assigning the fields from the message as values for JRNLCSV input parameters:
The following table describes the parameters passed to the JRNLBTCH by the START command:
Parameter
Description
archive dataset
Archive data set specified in the BBIPRINT DD of the modified DLOGJCL proc
system
Name of the system on which the BBI PAS is running
sysplex
Name of the sysplex on which the BBI PAS is running
ssid
BBI-SS name of the PAS to which the archived journal records belong
If this is not passed to LGLOGP in DLOGJCL proc, it has a null value.
- To test the setup, trigger the process by issuing the .I J BBI command to switch between the two BBI-SS PAS journal data sets that are allocated to your BBI PAS.
A sample of offloaded BBI-SS PAS journal data follows:
18.137 00:00:00 LMSUPDT $HASP373 LMSUPDT STARTED
18.137 00:00:00 BSHC EM0026I EXEC DALSTRT EID= 75273 STARTED ON 17-MAY-18 AT 00:00:00
18.137 00:00:00 BSHC ALCC0086 ALERT-D MVS_WNG-13 LMSUPDT TO=BSTK (ALCCSET)
18.137 00:00:00 BSHC EM0027I EXEC DALSTRT EID= 75273 ENDED ON 17-MAY-18 AT 00:00:00
18.137 00:00:01 BBAOBSHC .SWITCH J
18.137 00:00:01 BBAOBSHC AU0001I RULE OPCSTASK IN RULESET AAORULMV FIRED
18.137 00:00:01 BBAOBSHC AU0001I RULE DASTIMER IN RULESET AAORULMA FIRED
18.137 00:00:01 BBAOBSHC AU0001I RULE BBISWTCH IN RULESET AAORULBB FIRED
18.137 00:00:01 BSHC IM9100I COMMAND ACCEPTED
18.137 00:00:01 BBAOBSHC AU0001I RULE DEVIATIE IN RULESET AAORULMA FIRED
The output CSV contains the following columns:
- SYSPLEX
- SYSTEM
- SSID - If you did not enter PARM=’&SSID’ as a LGLOGP parameter, the SSID column of the CSV output contains a null value.
- DATE
- TIME
- ORIGIN
- MESSAGE - Enclosed in double quotation marks. Double quotation marks that appear in the message are doubled.
Sample content of CSV on mainframe
Sample content of CSV in Excel
You can use SFTP to export your CSV file out of the mainframe for analysis. For more information about using SFTP, see Exporting-historical-data-using-SFTP.
To create an automatic image log print procedure
Use ILOGJCL and the following procedure to set up a started task to print the BBI-SS PAS image log, if your products use this image log.
In BBPARM member BBISSPxx, specify a started task name with the following statement:IMAGSTC=xxxxxxxx
xxxxxxxx is a one- to eight-character name of a started task that is used to print the BBI-SS PAS image logs. BBIILOG is the default. The value that you enter must match the name of the started task that you add to your system PROCLIB.
- Copy BBSAMP member ILOGJCL into your JES PROCLIB data set and rename the member to the value that you specified for IMAGSTC in BBISSPxx.
Make the following changes to the JCL:
- In the PROC statement, change BBIILOG to the name that you want to use for your image log print procedure.
- In the PROC statement, change the PREFIX parameter to the high-level qualifier that was used to load product libraries to DASD.
- Change all occurrences of SSID to the subsystem ID of the BBI-SS PAS.
The image log print procedure is ready for use. If the product is already running when this step is completed, the BBISSPxx parameter change does not take effect until the BBI-SS PAS is restarted.