Tutorial: Automating selection of DB2 logs
This tutorial shows you how to define a DB2® system to Transaction Analysis Workbench, and then use that system definition to locate the related DB2 log files for a particular time interval.
Before you begin
- To locate DB2 log files, the Transaction Analysis Workbench automated file selection utility uses output from the DB2-supplied print log map utility, DSNJU004. DB2 (in particular, DSNJU004) must be installed on the system where you want to run the Transaction Analysis Workbench automated file selection utility.
- Determine the time interval (the
from
andto
dates and times) of the DB2 logs that you want to analyze. - Obtain the following details about the DB2 system that created the logs. If you already
have a DB2 system definition
that specifies these details (for example, your DB2 system definition repository is an existing CICS® Performance Analyzer HDB register that
contains shared system definitions), skip to step 8.
- DB2 subsystem identifier (SSID)
- Optionally, the SYSID of the MVS image on which the DB2 system runs
- DB2 version
- Whether the DB2 system is in a data sharing group (yes or no)
- DSNLOAD library data set name
- DB2 bootstrap data set (BSDS) name
If you do not know these details, contact your DB2 system administrator.
Procedure
- On the Transaction Analysis Workbench Primary
Option Menu, select
option 3
Systems.
The System Definitions Menu is displayed.
- Check the name of the data set for the
CICS, DB2, more
system definition repository.This is where Transaction Analysis Workbench will store the system definition that you are about to create. For this tutorial, you might choose to use a private data set rather than a data set that is shared with others. - Select DB2.
If the repository does not yet exist, a Define Repository Data Set panel is displayed; press Enter to create the repository.
Figure 1. Panel: System Definitions Menu File Help ──────────────────────────────────────────────────────────────────────── System Definitions Menu Command ===> Select the type of system then press Enter. Systems: Groups of Systems: 3 1. IMS 6. IMS systems (IMSplexes) 2. CICS 7. CICS, DB2 and related 3. DB2 4. MQ 5. MVS Image System definition repositories: IMS . . . . . . . . FUW.ISYSDEFS + CICS, DB2, more . . FUW.CSYSDEFS +The System Definitions panel is displayed. This panel lists any existing system definitions in the repository.
- Enter NEW on the command line.
A DB2 Subsystem panel for the new system is displayed.
- Enter the DB2 subsystem ID (SSID) and description.
- Specify the remaining details that you have obtained for
the DB2 system:
- Select the Definition system view (this is the default view, so it might already be selected).
- Specify the following details:
- Whether the DB2 system is in a data sharing group (yes or no)
- DSNLOAD library data set name
- DB2 bootstrap data set (BSDS) name
Figure 2. Panel: DB2 Subsystem definition File Help ─────────────────────────────────────────────────────────────────────────────── EDIT DB2 Subsystem More: < > Command ===> DB2 System definition: DB2 SSID . . . . . . . DB2P MVS Image . . . Description . . . . . . Production DB2 System View: 1 1. Definition 2. Cyclic SMF Files Specify DB2 Subsystem Definition: Data sharing . . . . . NO (YES or NO) DSNLOAD library . . . . 'DB2.PROD.SDSNLOAD' DB2 bootstrap . . . . . 'DB2P.BSDS01' Data sources SMF log stream . . . . RETPD Near-term history . . . - Press the Exit function
key (F3) to
save the DB2 system definition.
Press the Exit function
key (F3) repeatedly
until you return to the Transaction Analysis Workbench Primary
Option Menu.
The following steps use the DB2 system definition that you have just created to automate selection of the related log files for a particular time interval, and then add those selected files to a problem session.
- On the primary option menu, select option 1 Sessions.
- On the command line of the Session Manager panel, enter NEW to create a new session.
- On the Problem Details panel for the
new session, specify the following details:
- A summary (for example, DB2 log selection)
- The from and to dates and times of the log records that you want to analyze
- The DB2 system that you have just defined
Figure 3. Panel: Session Details: session that refers to a DB2 system File Help ────────────────────────────────────────────────────────────────────────────── Session Details Row 1 to 1 of 1 Command ===> Scroll ===> PAGE Key . . . . : 00000012 Description . DB2 log selection Severity . . Reference . . ── When problem occurred ─── Reported by . YYYY-MM-DD HH.MM.SS.TH Assigned to . From 2010-06-24 15.20.00.00 Status . . . OPEN To 2010-06-24 16.50.00.00 Template . . + Zone LOCAL Systems involved: / System + Type + DB2P DB2 ******************************* Bottom of data ******************************** - Press the Exit function
key (F3) to
save the new session. The session menu is displayed.
- Select option 3 Files.
- On the Locate and Manage Log Files panel,
run automated file selection:
- Enter AUTO on the command line.
The Automated File Selection window opens.
- Specify the DB2 system
that you defined previously. By default, automated file selection spans the same date and time interval as the problem session; however, you can override these default values.
Figure 4. Panel: Automated DB2 log file selection File Help ─────────────────────────────────────────────────────────────── Automated File Selection Command ===> Specify system and time range. Automated File System: ── Locate Files Interval ── System Name . . . DB2P + YYYY-MM-DD HH.MM.SS.TH System Type . . . DB2 + From 2010-06-24 15.20.00.00 File Type . . . . LOG + To 2010-06-24 16.50.00.00 - Press Enter to generate the JCL for the automated file
selection. The JCL is displayed in a Notepad (ISPF edit) panel.
- Submit the job: enter SUB on the command line.
- Enter AUTO on the command line.
- Press the Exit function key (F3) to exit the Notepad panel and return to the Locate and Manage Log Files panel.
- When the job is complete, enter REFRESH on
the command line to refresh the list of log files and to see any files
added by the job.
Figure 5. Panel: DB2 log files located by automated file selection File Help ────────────────────────────────────────────────────────────────────────────── Locate and Manage Log Files Row 1 to 3 of 3 Command ===> Scroll ===> PAGE NEW Insert a new log file. AUTO Run automated file selection to locate log files. Log Files: ──── System ──── File / Exc Data Set Name Name Type Type DB2P.ARCHLOG1.A0003778 DB2P DB2 LOG DB2P.ARCHLOG1.A0003780 DB2P DB2 LOG DB2P.ARCHLOG1.A0003779 DB2P DB2 LOG ******************************* Bottom of data ********************************