SlideShare a Scribd company logo
1 of 77
Download to read offline
1
May 7, 2007 1:40 p.m. – 2:40 p.m.
Platform: z/OS Mainframe
DB2 Systems Programming
Tools of the Trade
Linda Hagedorn
Performance and Tuning Experts
Session: B03
2
2
Linda Hagedorn
Performance & Tuning Experts
Linda.Hagedorn@Ireland.com
Session: B03
DB2 Systems Programming
Tools of the Trade
3
3
Introduction
• DB2 Systems Programming requires knowledge
across products and platforms. This presentation
includes the tools you need to understand,
manage, and control mainframe z/OS interaction
with UDB DB2.
• This presentation is operationally based – how
things are done, and why.
4
4
Questions and Notes
• Ask questions as we go along.
• I’ll repeat the questions for clarity.
• If you need answers further explained, say so.
• An interactive audience is welcome
• All examples in the presentation have links to
manuals on the notes pages.
• MVS, os/390, and z/OS are used interchangeably.
• ‘Systems programmer’ is abbreviated as sysprog.
5
5
DB2’s Connections in z/OS
• IPLINFO to
SYS1.PARMLIB
• SYS1.PARMLIB
• APFxx
• SCHEDxx
• IEFSSNxx
• PROGxx
• SSVT – Subsystem Vector
Table
• PPT – Program Properties
Table
• Console Dump Information
• SLIPS
• SYS1l.LOGREC
• DFSMS Storage Mgmt
• ACS routines
• SMF
• Live access – MANx
• Archive access
• IFCID and SMF Mapping
6
6
IPLINFO to SYS1.PARMLIB
• SYS1.PARMLIB is the generic name of the PDS containing
parameters that bring up the controls for z/OS.
• DB2 UDB’s connections are recorded in SYS1.PARMLIB or
another concatenated PARMLIB.
• At IPL (Initial Program Load), the parameters are loaded
and the system brought up,.
• Often the path is through SYS1.PARMLIB(*00) members,
but you cannot be sure.
• How can the path be determined?
7
7
Decoding the Path - IPLINFO
• From the console, /D IPLINFO
IEASYM LIST refers to the suffix of
IEASYMxx members in
SYS1.PARMLIB. This IPL will use
SYS1.PARMLIB(IEASYMD0).
IEASYS LIST likewise refers to suffixes,
this time of IEASYSxx members. We
have two here, concatenated:
SYS1.PARMLIB(IEASYSD0) AND
(IEASYSOP).
Note the 5th line. This is where IPL starts.
SYS0 IPLPARM(LOADD0) on unit
8
8
Decoding the Path – IPLPARM UNIT
• =3.4 to find the PDS SYS0.IPLPARM
• Often the dataset is uncataloged; if so, then locate
the volume, and then =3.4.
The book containing z/OS commands is found here:
http://publib.boulder.ibm.com/cgi-
bin/bookmgr/BOOKS/IEA2G170/CCONTENTS?SHELF=iea2bk70&DN=SA22-
7627-14&DT=20060616012438
The z/OS V1R8.0 MVS Bookshelf is here: http://publib.boulder.ibm.com/cgi-
bin/bookmgr/Shelves/iea2bk70
9
9
Decoding the path – LOADxx contents
IODF gives the external name of the IO Definition file: SYS1.IODF01 01 is the
suffix.
SYSCAT contains the name of the Master Catalog.
Col 1-6 SYSCAT
10-15 Vol ser containing the master cat
16 ‘1’ unless SYS% to SYS1 conversion is active, then it
is a ‘2’
17 Alias level of qualification (default 1)
18-19 CAS service task lower limit, default x’3C’
The next three are suffixes of members in SYS1.PARMLIB.
The PARMLIB are the concatenated PARMLIBs in use by MVS.
10
10
Decoding the path - IEASYSxx
• IEASYSxx contains a list of suffixes, pointing to
other SYS1.PARMLIB members. DB2 UDB
information is stored in several of these members.
• IEFSSNxx contains the entries for subsystems.
• PROGxx contains APF (Authorized Program
Facilities) and LNKLST (Linklist) entries.
• SCHEDxx contains overrides to the PPT.
• IEAAPFxx (APF entries)
• LNKLSTxx (Linklist)
• LOGREC= is the name of the logrec file.
DB2 information is shipped in z/OS’s PPT (Program
Properties Table). The SCHED entry would override the
PPT. This is for informational purposes only.
The PPT shipped with z/OS does not need an override.
IEAAPFxx and LNKLSTxx are still operational, but entries
can be made to the PROGxx member instead.
PROGxx is being used instead of IEAAPFxx and
LNKLSTxx in many, if not most, shops.
11
11
Updates to SYS1.PARMLIB
• z/OS commands can be used to add subsystems and
libraries on the fly, enabling work to move forward
instead of waiting for an IPL.
• IEFSSNxx – use z/OS command: SETSSI
• PROGxx – use z/OS command: SETPROG for
APF and LNKLST
• SCHEDxx – use z/OS command: SET SCH
• Update SYS1.PARMLIB separately.
• Syntax for the commands is found in the ‘z/OS MVS
Systems Command Manual.’
The book containing z/OS commands is found here:
http://publib.boulder.ibm.com/cgi-
bin/bookmgr/BOOKS/IEA2G170/CCONTENTS?SHELF=iea2bk70&DN=SA22-
7627-14&DT=20060616012438
The z/OS V1R8.0 MVS Bookshelf is here: http://publib.boulder.ibm.com/cgi-
bin/bookmgr/Shelves/iea2bk70
12
12
IEFSSNxx – SETSSI Command
• SETSSI {ADD,{SUBNAME|SUB|S}=subname
[,{CONSNAME|C}=consname]
[,{INITRTN|I}=initrtn[,{INITPARM|P}=initparm]]}
{DEACTIVATE|DEACT}
,{SUBNAME|SUB|S}=subname}
{ACTIVATE|ACT},{SUBNAME|SUB|S}=subname }
• To add a DB2 subsystem from the console:
SETSSI ADD,SUBNAME=ssname,I=DSN3INI,
P='DSN3EPX,-DBP1,S,DBP0’
DBP0'Example of SETSSI command syntax from z/OS MVS Systems Commands
Manual V1R8.0
http://publib.boulder.ibm.com/cgi-
bin/bookmgr/BOOKS/IEA2G170/4.49.1?SHELF=iea2bk70&DT=20060616012438
&CASE=
Example of IEFSSNxx entry from DB2 UDB R810 Install Manual
http://publib.boulder.ibm.com/cgibin/bookmgr/BOOKS/DSNIGJ13/2.6.1.1?SHELF
=dsnshja2&DT=20050324144101
&CASE=•SUBSYS SUBNAME(ssname) INITRTN(DSN3INI)
INITPARM('DSN3EPX,prefix<,scope<,group-attach>> '
13
13
PROGxx – SETPROG APF LNKLST
• SETPROG APF{,FORMAT={DYNAMIC|STATIC}}
{,{ADD|DELETE},DSNAME|LIBRARY=libname,{SMS
|VOLUME=volume} }
• To add a SMS-managed SDSNLOAD to the APF
authorized list from the console:
SETPROG
APF,ADD,DSNAME=DSN810.SDSNLOAD,SMS
Setprog command is found in the MVS System Commands
http://publib.boulder.ibm.com/cgi-
bin/bookmgr/BOOKS/IEA2G170/4.44?SHELF=iea2bk70&DT=20060616012438
14
14
Display APF and LNKLST
• The APF authorized, and linklisted libraries can be
displayed from the console.
• To display APF
• D PROG,APF
• To display LNKLST
• D PROG,LNKLST
D PROG, APF command is found: http://publib.boulder.ibm.com/cgi-
bin/bookmgr/BOOKS/IEA2G170/4.10.41?SHELF=iea2bk70&DT=2006061601243
8#HDRD3PROG
D PROG,LNKLST command is found: http://publib.boulder.ibm.com/cgi-
bin/bookmgr/BOOKS/IEA2G170/4.10.43?SHELF=iea2bk70&DT=2006061601243
8
15
15
Display PARMLIB
• /D PARMLIB to display the order of the parmlibs
16
16
SSVT – Subsystem Vector Table
• IRLM should not be forced due to the operation of the SSVT.
• NIP (Nucleus Initialization Program) executes SDSNLINK
ERLY code at IPL to create entries in the SSVT.
• If IRLM is MVS FORCEd down, SSVT is not cleaned up, and
there is no way to manually clean it up.
• If DB2 tries to come up, it thinks that IRLM is still running and
will not start.
• The only way to reestablish the SSVT entry for the forced IRLM
is to IPL.
• Alternatively, by defining a 2nd IRLM, change ZPARMs and the
IRLM startup proc to point to the new name, DB2 can be
brought up with the alternate IRLM.
• MVS CANCEL can be used on IRLM, but not FORCE.
F DBxxIRLM,STATUS to determine the status of IRLM
If MVS FORCE is used, and an alternate IRLM is connected in zparm, the original
IRLM cannot be used until an IPL is done to clean up the SSVT.
17
17
IRLM shutdown, MVS commands
• Normal sequence:
• Shutdown of DB2 usually stops IRLM.
• /STOP irlmproc
• /MODIFY irlmproc,ABEND or
/F irlmproc,ABEND,DUMP
• /CANCEL irlmproc
• Avoid if at all possible. If entered, this
command requires an IPL to clean up
SSVT
• /FORCE irlmproc
18
18
PPT Program Properties Tables
• z/OS is shipped with the PPT populated.
• The PPT contains among other things, the Protect
Key – a memory protection mechanism.
• Lower numbers can write in higher number areas.
Higher numbers cannot write in lower number
areas.
• The operating system runs in key 0.
• Access method services runs in key 5.
• CICS and DB2 run in key 7.
• Applications run in 8.
The populated PPT is documented in the z/OS V1R8.0 MVS Initialization and
Tuning Reference found here:
http://publib.boulder.ibm.com/cgi-
bin/bookmgr/BOOKS/iea2e270/68.7?ACTION=MATCHES&REQUEST=ppt&TY
PE=FUZZY&SHELF=iea2bk70&DT=20060710234538&CASE=&searchTopic=T
OPIC&searchText=TEXT&searchIndex=INDEX&rank=RANK&ScrollTOP=FIRS
THIT#FIRSTHIT
19
19
Synonym Meaning SCHEDxx keyword
NC Non-cancelable NOCANCEL
NS Non-swappable NOSWAP
PR Privileged PRIV
ST System task SYST
ND No data set integrity NODSI
BP Bypass password protection NOPASS
Key PSW key for this program KEY(x)
Proc Affinity Processors eligible AFF(y)
2P Second level preferred storage SPREF
1P First level preferred storage LPREF
NP No preferred storage NOPREF
20
20
Protect Key and the PSW
• In a PSW (Program Status Word), the third
position is the protect key:
PSW 077D0000 A242B10A Protect key 7 (DB2)
PSW 078D0000 80A7328C Protect key 8 (problem program)
Problem program (application code) runs with the least protection.
If this message is displayed, the application has been dropped from
it’s key to key 8, or lost other PPT attributes:
IEF188I PROBLEM PROGRAM ATTRIBUTES ASSIGNED
The Program Properties Table in DB2 UDB R810 is found here:
http://publib.boulder.ibm.com/cgi-
bin/bookmgr/BOOKS/IEA2E270/68.7?SHELF=iea2bk70&DT=20060710234538
21
21
PSW Protect Keys and APF
• Programs listed in the PPT will run in the assigned key,
unless something with a higher key is included in their
execution libraries on steplib or joblib, or if the required
library is not APF-authorized.
• Including a higher key library will cause all libraries in
the concatenation ot be assigned to the highest
number.
• Programs requiring a lower number will likely have
problems executing – S0C4, S047, etc.
• To easily identify the source of the problem, know that
DB2 PSW is key 7. If the error PSW is 078, you know
something is wrong with the execution libraries.
22
22
Questions
• We covered IPLPARMs, SYS1.PARMLIB, APF,
SCHED, LNKLST, SSVT, PPT, PSW and protect
keys.
• Any questions?
23
23
Console Dump Info – SYS1.DAE
• Systems dump occasionally – slipped, on their
own, or forced.
• SYS1.DAE is the dump suppression mechanism
shipped with MVS to save the overhead of
duplicate dumping.
• When a product dumps, a symptom string is built
and SYS1.DAE is checked to see if it’s already
dumped. If the symptom string matches, the dump
is suppressed.
24
24
Console Dump Info – SYS1.DAE
• If the symptom string isn’t present, the dump is
taken and the string added to SYS1.DAE.
• If SYS1.DAE is suppressing a dump you need, edit
it and delete the line containing the symptom
string.
25
25
Dumps – Slip management
• Slips cause a dump to be taken when certain
criteria is set.
• Slips are set from the console.
• They can be enabled, set to run multiple times,
disabled, and deleted from the system.
26
26
Setting Slips
• The syntax is –
• SLIP SET,[options],END
• This example will set a slip, name it MA01, looking for
a system abend 0C7, in job MA01B55, abend type
SVC.
• SLIP SET,ID=MA01,C=0C7,J=MA01B55,A=SVCD,E
• The ‘E’ terminates the slip command. Matchlim is the
number of times it will fire, and if not specified, will
default to once.
27
27
Setting Slips
• This example names the slip QA01, gives us an
SVC dump for a system abend 04E on a specific
DB2 reason code, matchlim is 3 (will fire 3 times),
and an E to end.
• SET,ID=QA01,A=SVCD,C=04E,REASON=00C90301
,ML=3,E
28
28
Setting slips – parameters
• SET,ID=QA01,A=SVCD,C=04E,REASON=00C90301,ML=3,E
• System abends are coded C=xxxx.
• User abends are coded C=Uxxxx.
• Matchlim (abbreviated ML) is useful if you have
to take multiple dumps of a reoccurring problem,
usually because you’re working with MVS
increasing the dump dataset size.
29
29
Slips - Displaying
• Display all slips
• /D SLIP
ID STATE ID STATE
ZA14 ENABLED XB37 ENABLED
U775 ENABLED MA01 ENABLED
• Display the characteristics of a named slip
• /D SLIP=MA01
30
30
Slips – Enable, Disable, Delete
• Enable a previously disabled (or fired) slip
SLIP MOD,ID=xxxx,EN
• Disable a previously enabled slip
SLIP MOD,ID=xxxx,D
• Delete a slip
SLIP DEL,ID=xxxx
Slip commands are found in the z/OS Systems Commands
http://publib.boulder.ibm.com/cgi-
bin/bookmgr/BOOKS/IEA2G170/4.52?SHELF=iea2bk70&DT=20060616012438
Syntax diagram is here:
http://publib.boulder.ibm.com/cgi-
bin/bookmgr/BOOKS/IEA2G170/4.52.5.3?SHELF=iea2bk70&DT=200606160124
38#HDRSIACT
31
31
Console Dump Info
IEA611I COMPLETE DUMP ON N848S1.SYSA.D060214.T034543.DB2YDIST.S00005
IEE854I 03.47.27 SYS1.DUMP ERRDATA 393
SYS1.DUMP DATA SETS AVAILABLE=000 AND FULL=000
CAPTURED DUMPS=0000, SPACE USED=00000000M, SPACE FREE=00002500M
MSDUMP.SYSD.D060214.T034543.DTADDIST.S00005 TITLE=DTAD,
ABND=04E-00E70005,U=N99999 ,C=XYR00.710.LOCN=199.99.999.9
,LOC=DSNXGRDS.DSNXGTRE:M120
DUMP TAKEN TIME=03.46.08 DATE=02/14/2007
ERRORID=SEQ63621 CPU0042 ASID00B9 TIME=03.45.40
SYSTEM ABEND CODE=04E REASON CODE=00E70005
MODULE=DSNXGRDS CSECT=DSNXGTRE
PSW AT TIME OF ERROR=477C1000 A998AA2E ILC=2 INT=0D
TRANSLATION EXCEPTION ADDR=00584000
ABENDING PROGRAM ADDR=******** RECOVERY ROUTINE=DSNTFRCV
GPR 0-3 00000004 0004E000 00000015 6512373F
GPR 4-7 506147E0 00000015 1A7EB418 60557950
GPR 8-11 00000008 00000002 65123728 A998A450
GPR12-15 2998B44F 65123500 A998AA20 00E70005
32
32
Console Dump Info – IEAx11
• On the console, look for the message to determine
if the dump was complete or not.
• IEA911 if the dump goes to SYS1.DUMPxx datasets
• IEA622 if the dump goes to dynamically allocated
datasets.
• Incomplete dumps are seldom useful for problem
diagnosis. Another dump may be needed.
33
33
Console Dump Info – IEAx11
• The dump message will also tell you if the dump
dataset is too small.
• MVS Systems Programmers will reallocate the
dump datasets large enough to hold the dump.
34
34
Dump Info – SDSF DUMPSRV
• There are several ways to determine if the system
is dumping, besides it being slow.
• SDSF - DUMPSRV will be running when the
system is dumping.
• In SDSF, PRE DUMPSRV* and look for the
running address space.
• Dumps move from DUMPSRV to the
SYS1.DUMPxx or dynamically allocated datasets,
then to a final location and name.
35
35
Dump Info – D D,ERRDATA
D D,ERRDATA
IEE854I 15.36.37 SYS1.DUMP ERRDATA 665
SYS1.DUMP DATA SETS AVAILABLE=004 AND FULL=001
CAPTURED DUMPS=0000, SPACE USED=00000000M, SPACE
FREE=00001000M
DUMP02 TITLE=#1 OF 4 SPXRCM97
DUMP TAKEN TIME=14.49.54 DATE=01/16/06
NO DUMP DATA AVAILABLE FOR THE FOLLOWING EMPTY
SYS1.DUMP DATA SETS:
01,03-05
Very, very useful command for determining the ability of DUMPSRV to handle a
dump, if it’s busy, how much space is available, and if dumps are in process to roll
over to their destination.
36
36
Dump Info – D D,ERRDATA
• This tells us we have one dump in the
SYS1.DUMPxx datasets that has not yet been
written to the dump manager datasets.
SYS1.DUMP DATA SETS AVAILABLE=004 AND FULL=001
• This tells us that space used is 0, meaning the
DUMPSRV has room to take another dump. The
full dump in the SYS1.DUMPxx dataset does not
count against the DUMPSRV available space.
CAPTURED DUMPS=0000, SPACE USED=00000000M, SPACE
FREE=00001000M
37
37
Dump Info – D D,ERRDATA
• This is the title of the dump that’s waiting to move
from the SYS1.DUMPxx dataset to disk, and the
list of empty SYS1.DUMPxx datasets.
DUMP02 TITLE=#1 OF 4 SPXRCM97
DUMP TAKEN TIME=14.49.54 DATE=01/16/96
NO DUMP DATA AVAILABLE FOR THEFOLLOWING EMPTY
SYS1.DUMP DATA SETS:
01,03-05
38
38
Dump command, D D,T
• /D D,T will display the dumps and titles.
IEE853I 13.59.47 SYS1.DUMP TITLES
SYS1.DUMP DATA SETS AVAILABLE=000 AND FULL=000
CAPTURED DUMPS=0000, SPACE USED=00000000M, SPACE
FREE=00000500M
SYS1.DUMP.D070303.T192346.L06RS005.S00001 TITLE=ENF ABEND
ERRORMOD=IEFENFNM
DUMP TAKEN TIME=15.23.50 DATE=03/03/07
NO DUMP DATA AVAILABLE FOR 004 AUTOMATICALLY ALLOCATED
DUMP DATA SETS
39
39
Questions – Dump Info
• Any questions before we leave dumps?
40
40
SYS1.LOGREC
• Logrec is a z/OS central repository for error, informational,
and statistical records from software and hardware.
• Most it not all products write to logrec.
• Dumps write corresponding records to SYS1.LOGREC as
the software percolates through the dump process.
• The DUMP ERRORID can be found in it’s matching
LOGRECS.
• Logrecs are written to default SYS1.LOGREC, but the
destination can be tailored. Often it’s tailored as
SYS1.<lpar>.LOGREC.
• Logrecs roll over to daily, weekly, monthly files driven either
by time or as SYS1.LOGREC is filled.
EREP bookshelf: http://publib.boulder.ibm.com/cgibin/bookmgr/Shelves/ifc5bk04
41
41
SYS1.LOGREC
• EREP (Environmental Record Editing and Printing
Program) reports can be run off the live files, an
extract, or from the historical files.
• SYS1.LOGREC is a time-based collection of rows.
• The extract program is IFCOFFLD.
• The report program is IFCEREP1.
• EREP is executed with control cards to filter and
extract records to a dataset for shipping to IBM, or
printing to the spool.
42
42
SYS1.LOGREC – Extract and zero
//P390OFFL JOB (),'SYS1.LOGREC OFFLOAD',CLASS=A,MSGCLASS=X,
// NOTIFY=&SYSUID,TIME=1440,REGION=48M
//STEP1 EXEC PGM=IFCOFFLD
//SERLOG DD DSN=SYS1.LOGREC,DISP=OLD
//ACCDEV DD DSN=P390.LOGREC1,DISP=(NEW,CATLG,CATLG),
// SPACE=(TRK,(100,100),RLSE),UNIT=3390,
// DCB=(RECFM=VB,BLKSIZE=6144),VOL=SER=OS39M1
//TOURIST DD SYSOUT=* ,DCB=BLKSIZE=133
//EREPPT DD SYSOUT=* ,DCB=BLKSIZE=133
//SYSIN DD DUMMY
WARNING:
• SYSIN is defaulting to ACC=Y and ZERO=Y to dump the ACC file
and zero out SYS1.LOGREC.
Note: This job will EMPTY SYS1.LOGREC. The logrecs will be moved to the
ACCDEV DD.
DDs for the HISTORICAL Extract are found here:
http://publib.boulder.ibm.com/cgibin/bookmgr/BOOKS/IFC5G101/4.2?SHELF=ifc
5bk04&DT=19990120114558
43
43
SYS1.LOGREC – Report JCL
//S0 EXEC PGM=IFCEREP1,REGION=1024K,
// PARM='CARD'
//SERLOG DD DISP=(OLD,KEEP),DSN=SYS1.LOGREC
//ACCDEV DD DISP=(MOD,CATLG,CATLG),DSN=SYS1.LOGREC.HIST,
// UNIT=SYSDA,SPACE=(CYL,(2,2)),
// DCB=(RECFM=VB,BLKSIZE=6144)
//DIRECTWK DD DISP=(NEW,DELETE),UNIT=SYSDA,SPACE=(CYL,2,,CONTIG)
//EREPPT DD SYSOUT=*,DCB=BLKSIZE=133
//TOURIST DD SYSOUT=*,DCB=BLKSIZE=133
//SYSIN DD *
ACC=N <-Copy SYS1.LOGREC?
DATE=(06135),TIME=(1600-1630)
PRINT=AL
ZERO=N <-Zero out SYS1.LOGREC?
Report parameters are found here:
http://publib.boulder.ibm.com/cgibin/bookmgr/BOOKS/ifc5g101/2.3.1?SHELF=ifc
5bk04&DT=19990120114558
44
44
Replace with newer version. #2
This shows the LOGREC header – the ERRORID will match dump info from the
console, if a dump was produced. The search argument string, failing load module
and csect, abend code, reason code, etc.
There may be many LOGRECs for a given failure as each component percolates
through the dump process.
45
45
Replace to correspond with 42. #3.
46
46
SYS1.LOGRECs correlate to the
DB2 Diagnosis Guide
• DB2 Logrecs contain the SDWA (System
Diagnostic Work Area).
• SDWA is formatted by EREP.
• The codes and fields in SDWA are documented in
the DB2 UDB Diagnosis Guide. In version 8, they
start on page 207.
47
47
All the keys on a DB2 LOGREC formatted SDWAVRA are documented in the DB2
UDB Diagnosis Guide.
x’06’ is the abend reason code
x’CA’ is the subsystem name
x’3A’ are address space ids
Etc.
48
48
49
49
Questions – SYS1.LOGREC
• Questions before we leave LOGREC?
50
50
DFSMS Storgroups
• Many shops are now SMS Managed.
• DASD are organized into STORGROUPS. This is
different than DB2’s STOGROUP, but works
functionally similar.
• SMS writes ACS routines (Automatic Class
Selection) routines to route datasets to certain
STORGROUPS.
• DB2 Stogroups can point to individual DASD, or ‘*’
meaning SMS-managed.
z/OS V1R8.0 DFSMS Bookshelf http://publib.boulder.ibm.com/cgi-
bin/bookmgr/Shelves/dgt2bk60
z/OS V1R8.0 DFSMS Storage Administration Management
http://publib.boulder.ibm.com/cgi-
bin/bookmgr/BOOKS/DGT2S250/CCONTENTS?SHELF=dgt2bk60&DN=SC26-
7402-06&DT=20060616125145
51
51
ACS Routines
• ACS routines are usually managed through ISMF
(Interactive Storage Manage Facility). Similar to
ISPF panels.
• The routines are translated into a SCDS (Source
Control Data Set).
• SCDS is a VSAM linear dataset.
ACS management is found in the z/OS V1R8.0 DFSMS Storage Administration
Reference chapter 10.
http://publib.boulder.ibm.com/cgi-
bin/bookmgr/BOOKS/DGT2S250/CCONTENTS?SHELF=dgt2bk60&DN=SC26-
7402-06&DT=20060616125145
52
52
ACS management is found in the z/OS V1R8.0 DFSMS Storage Administration
Reference chapter 10.
http://publib.boulder.ibm.com/cgi-
bin/bookmgr/BOOKS/DGT2S250/CCONTENTS?SHELF=dgt2bk60&DN=SC26-
7402-06&DT=20060616125145
53
53
DFSMS – Lay of the Land
• Sometimes SMS usage raises issues in DB2: dynamic
allocation failure, severe SMS catalog errors.
• DASD containing DB2 datasets can be on-line and
available, but missing from the SMS catalog.
• DB2’s call for a dataset is handed to SMS, but because
the DASD is not in the STORGROUP, a severe SMS
catalog error is reported to DB2.
• These are the commands to see how the
STORGROUPs are laid out – their names, contents
(DASD volumes), and if the DASD appears in more
than one STORGROUP.
Recently a SMS change caused problems in DB2. Production
user application partitions were unavailable;
This message was reported in the DB2MSTR log: DSNB207I
Dynamic allocation of dataset failed. Reason=97040000
DSNAME=xxxx.
According to the Authorized Assembler Services Guide,
9704 is a class 7 Severe SMS Catalog service error.
OS/390 210 Authorized Assembler Services Guide
http://publib.boulder.ibm.com/cgibin/bookmgr/BOOKS/IEA1A
842/CCONTENTS?DT=20011024153852
Search for 9704, or 17zz. zz is what they use to
substitutes characters in this book.
In the case of the 9704, the datasets or partitions were
not found in the SMS catalog, although the volumes were
on-line, enabled, and the problem datasets could be
found via ISPF 3.4.
54
54
DFSMS – Display STORGROUP
• D SMS,SG(ALL) will list all the
stogroups in the system.
• D SMS,SG(xxxxxx),LISTVOL will list all the
volumes in a stogroup.
• D SMS,VOL(volser) will list all the
stogroup(s) the vol appears in.
These three commands will allow you to map DFSMS on your system.
55
55
D SMS,SG(ALL)
D SMS,SG(ALL)
IGD002I 14:50:27 DISPLAY SMS 302
STORGRP TYPE SYSTEM= 1
SGDBEL90 POOL +
SGDBE90 POOL +
SGDB2L90 POOL +
SGDB2X90 POOL +
SGDB2Z90 POOL +
SGDB290 POOL +
SGDUMMY DUMMY .
SGEPRD90 POOL +
SGETON90 POOL +
SGETST90 POOL +
56
56
D SMS,SG(ALL) - Continued
UPSCPM POOL +
UPSSUPP POOL +
UPSTSO POOL +
***************************** LEGEND *****************************
. THE STORAGE GROUP OR VOLUME IS NOT DEFINED TO THE SYSTEM
+ THE STORAGE GROUP OR VOLUME IS ENABLED
- THE STORAGE GROUP OR VOLUME IS DISABLED
* THE STORAGE GROUP OR VOLUME IS QUIESCED
D THE STORAGE GROUP OR VOLUME IS DISABLED FOR NEW ALLOCATIONS ONLY
Q THE STORAGE GROUP OR VOLUME IS QUIESCED FOR NEW ALLOCATIONS ONLY
> THE VOLSER IN UCB IS DIFFERENT FROM THE VOLSER IN CONFIGURATION
SYSTEM 1 = MVS1
The list of Storgroups is displayed followed by a character, and the legend is
displayed at the end of the message.
57
57
D SMS,SG(SGDB2L90),LISTVOL
IGD002I 14:53:58 DISPLAY SMS 207
STORGRP TYPE SYSTEM= 1
SGDB2L90 POOL +
VOLUME UNIT SYSTEM= 1 STORGRP NAME
DB2L20 + SGDB2L90
<snip>
DB2L30 + SGDB2L90
DB2L31 + SGDB2L90
DB2L32 + SGDB2L90
DB2L33 + SGDB2L90
DB2L34 + SGDB2L90
DB2L35 + SGDB2L90
DB2L36 + SGDB2L90
DB2L37 + SGDB2L90
DB2L38 + SGDB2L90
***************************** LEGEND *****************************
. THE STORAGE GROUP OR VOLUME IS NOT DEFINED TO THE SYSTEM
+ THE STORAGE GROUP OR VOLUME IS ENABLED
- THE STORAGE GROUP OR VOLUME IS DISABLED
> THE VOLSER IN UCB IS DIFFERENT FROM THE VOLSER IN CONFIGURATION
SYSTEM 1 = MVS1
58
58
D SMS,VOL(volser)
IGD002I 14:54:50 DISPLAY SMS 284
VOLUME UNIT SYSTEM= 1 STORGRP NAME
DB2L25 + SGDB2L90
*********************** LEGEND ***********************
. THE STORAGE GROUP OR VOLUME IS NOT DEFINED TO THE SYSTEM
+ THE STORAGE GROUP OR VOLUME IS ENABLED
- THE STORAGE GROUP OR VOLUME IS DISABLED
* THE STORAGE GROUP OR VOLUME IS QUIESCED
59
59
Questions - DFSMS
• Any questions before leaving DFSMS?
60
60
SMF – System Management Facilities
• SMF is a record collection mechanism in MVS.
• SMF data is used for billing users, analyzing
configuration, reporting DASD usage, etc. The
information contained in SMF is extensive.
• IBM products are assigned a SMF record number in
which they can write their SMF data.
• DB2 is assigned numbers 100, 101, and 102.
• DB2’s IFCIDs are written into these SMF records.
SMF Manuals are in the z/OS Shelf: http://publib.boulder.ibm.com/cgi-
bin/bookmgr/BOOKS/IEA2G270/CCONTENTS?SHELF=iea2bk70&DN=SA22-
7630-13&DT=20060626104432
61
61
Reference: http://publib.boulder.ibm.com/cgi-
bin/bookmgr/BOOKS/IEA2G270/13.0?SHELF=iea2bk70&DT=20060626104432
z/OS 1.8
62
62
SMF – DB2’s IFCIDs
• DB2 control blocks are dumped to IFCIDs periodically.
• The IFCIDs chosen for writing are controlled by the
trace command.
• Several IFCIDs will be written to a single SMF record;
as many as will fit on one page.
• The SMF record has the standard SMF header
pointing to the self-defining section, the IFCIDs, and
the self-defining section. The header is x’1C’ in
length.
• Only one type of IFCID will be on a single SMF record.
63
63
SMF – MANx files
• SMF writes into SYS.MANx files.
• The files roll to daily, weekly, and monthly files, depending
on how the MVS sysprogs set it up.
• The live files can be accessed, as well as the historical.
• Caution is called for when accessing the files live – if they
are emptied, critical system information is lost.
• Some of the basic examples in the book demonstrate how
to empty the files, and as this has been done inadvertently
in some shops, naturally MVS is concerned over any live
access to the MANx files.
64
64
SMF – Display MANx Status
• D SMF[,S|,O][,L={a|name|name-a}]
COMMAND INPUT ===> /D SMF
RESPONSE=DVLP
IEE974I 15.53.37 SMF DATA SETS
NAME VOLSER SIZE(BLKS) %FULL STATUS
P-SYS1.MAN1.DVLP DVMAN1 37080 70 ACTIVE
S-SYS1.MAN2.DVLP DVMAN1 37080 0 ALTERNATE
S-SYS1.MAN3.DVLP DVMAN1 37080 0 ALTERNATE
S-SYS1.MAN4.DVLP DVMAN1 37080 0 ALTERNATE
S-SYS1.MAN5.DVLP DVMAN2 37080 0 ALTERNATE
S-SYS1.MAN6.DVLP DVMAN2 37080 0 ALTERNATE
http://publib.boulder.ibm.com/cgibin/bookmgr/BOOKS/IEA2G160/4.10.47?SHELF
=iea2bk60&DT=20050714212238
S = dataset status
O = SMF Options
L = Display area or console name for the display. Defaults to the console log.
65
65
SMF – Live access and extract
• This will extract DB2 IFCIDs from an active MANx file.
//SMFEXTR EXEC PGM=IFASMFDP
//SYSPRINT DD SYSOUT=*
//INDD DD DSN=SYS1.MAN1.DVLP,DISP=SHR
//OUTDD DD DSN=EXT1LH.DVLP.SMF.EXTRACT,DISP=(,CATLG),
// DCB=(LRECL=32756,RECFM=VBS,BLKSIZE=0,DSORG=PS),
// UNIT=SYSDA,SPACE=(CYL,(5,5))
//SYSIN DD *
DATE(2007039,2007039)
START(0900)
END(1036)
INDD(INDD,OPTIONS(DUMP))
OUTDD(OUTDD,TYPE(100,101,102))
/*
The example does not purge or otherwise affect SMF. It runs an extract only.
66
66
SMF – Historical access
• From the extract above, you can run dumps of the
IFCIDs.
• Alternatively, when the MANx files rollover, they
will be in the historical files set up by MVS – daily,
weekly, etc.
• IDCAMS can be used to dump the records.
• These are raw, so you can see the actual SMF
record header, the self-defining area, and the
IFCIDs.
67
67
SMF – Dumping the records
• IDCAMS or DFSERA10 can be used to dump the
extract
//IDCAMS EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=EXT1LH.DVLP.SMF.EXTRACT,
// DISP=SHR
//SYSIN DD *
PRINT IFILE(SYSUT1) DUMP
68
68
SMF – Dumping the records
//S010 EXEC PGM=DFSERA10
//STEPLIB DD DSN=SLP41.APF.RESLIB,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=EXT1LH.DVLP.SMF.EXTRACT,DISP=SHR
//SYSIN DD *
OPTION PRINT
END
• If SMF contains more than one DB2’s records, this print
option will strip out the SMF records for the rows with the
value at offset 19 (the subsystem name), DVLP in this
example:
OPTION PRINT OFFSET=19,FLDTYP=C,VALUE=DVLP,FLDLEN=4
69
69
SMF – ‘REVIEW’ – CBT Tape
• On the CBT tape is a tool to read and format raw
SMF data. It’s called ‘REVIEW’.
• If your shop permits the CBT tools, download and
install from www.cbttape.org. The instructions are
on the site.
• =3.4 to list the extract file, and in the command
column, type ‘REVIEW’.
70
70
SMF – REVIEW – CBT Tape
71
71
SMF – FORMAT SMF
• Type SMF on the command line and REVIEW will convert the raw
data to readable data. It’s still SMF, so there’s no reporting or
formatting, but you can see it.
72
72
Mapping IFCIDs to SMF
• Mapping introduction is found in
ADSNMACS(DSNWMSGS).
• In DB2 UDB R810, it’s been moved to
ADSNIVPD(DSNWMSGS).
• This member also contains the cross reference
between trace classes and ifcids – very valuable if
you are looking for a specific IFCID and have to
find the trace that writes it.
73
73
Mapping cross-reference
These are the modules containing the maps to the IFCIDs. For example, 337 in
R710 is for migration zparm PKGLDTOL (package load toleration). It would be
mapped in DSNDQW04.
74
74
Trace type to SMF xref - DSNWMSGS
75
75
Recap
DB2’s Connections in z/OS
• IPLINFO to
SYS1.PARMLIB
• SYS1.PARMLIB
• APFxx
• SCHEDxx
• IEFSSNxx
• PROGxx
• SSVT – Subsystem Vector
Table
• PPT – Program Properties
Table
• Console Dump Information
• SLIPS
• SYS1l.LOGREC
• DFSMS Storage Mgmt
• ACS routines
• SMF
• Live access – MANx
• Archive access
• IFCID and SMF Mapping
76
76
Thank you!
If you’re interested in other DB2
Systems Programming sessions,
let IDUG know.
Write it on the session review
form.
77
77
Session B03
DB2 Systems Programming – Tools of the Trade
Linda Hagedorn
Performance & Tuning Experts
Linda.Hagedorn@Ireland.com

More Related Content

What's hot

Z OS IBM Utilities
Z OS IBM UtilitiesZ OS IBM Utilities
Z OS IBM Utilitieskapa rohit
 
IBM DB2 for z/OS Administration Basics
IBM DB2 for z/OS Administration BasicsIBM DB2 for z/OS Administration Basics
IBM DB2 for z/OS Administration BasicsIBM
 
Parallel Sysplex Implement2
Parallel Sysplex Implement2Parallel Sysplex Implement2
Parallel Sysplex Implement2ggddggddggdd
 
Mainframe IPL Process.pdf
Mainframe IPL Process.pdfMainframe IPL Process.pdf
Mainframe IPL Process.pdfssuseraa0df4
 
Upgrade to zOS V2.5 - Planning and Tech Actions.pdf
Upgrade to zOS V2.5 - Planning and Tech Actions.pdfUpgrade to zOS V2.5 - Planning and Tech Actions.pdf
Upgrade to zOS V2.5 - Planning and Tech Actions.pdfMarna Walle
 
I Didn't Know You Could Do That with zOS.pdf
I Didn't Know You Could Do That with zOS.pdfI Didn't Know You Could Do That with zOS.pdf
I Didn't Know You Could Do That with zOS.pdfMarna Walle
 
DB2 for z/OS Architecture in Nutshell
DB2 for z/OS Architecture in NutshellDB2 for z/OS Architecture in Nutshell
DB2 for z/OS Architecture in NutshellCuneyt Goksu
 
A First Look at the DB2 10 DSNZPARM Changes
A First Look at the DB2 10 DSNZPARM ChangesA First Look at the DB2 10 DSNZPARM Changes
A First Look at the DB2 10 DSNZPARM ChangesWillie Favero
 
Best practices for DB2 for z/OS log based recovery
Best practices for DB2 for z/OS log based recoveryBest practices for DB2 for z/OS log based recovery
Best practices for DB2 for z/OS log based recoveryFlorence Dubois
 
zOSMF SDSF_ShareLab_V2R5.pdf
zOSMF SDSF_ShareLab_V2R5.pdfzOSMF SDSF_ShareLab_V2R5.pdf
zOSMF SDSF_ShareLab_V2R5.pdfMarna Walle
 
DB2 for z/OS and DASD-based Disaster Recovery - Blowing away the myths
DB2 for z/OS and DASD-based Disaster Recovery - Blowing away the mythsDB2 for z/OS and DASD-based Disaster Recovery - Blowing away the myths
DB2 for z/OS and DASD-based Disaster Recovery - Blowing away the mythsFlorence Dubois
 
Presentation db2 connections to db2 for z os
Presentation   db2 connections to db2 for z osPresentation   db2 connections to db2 for z os
Presentation db2 connections to db2 for z osxKinAnx
 
z16 zOS Support - March 2023 - SHARE in Atlanta.pdf
z16 zOS Support - March 2023 - SHARE in Atlanta.pdfz16 zOS Support - March 2023 - SHARE in Atlanta.pdf
z16 zOS Support - March 2023 - SHARE in Atlanta.pdfMarna Walle
 
IBM z/OS Communications Server z/OS Encryption Readiness Technology (zERT)
IBM z/OS Communications Server z/OS Encryption Readiness Technology (zERT)IBM z/OS Communications Server z/OS Encryption Readiness Technology (zERT)
IBM z/OS Communications Server z/OS Encryption Readiness Technology (zERT)zOSCommserver
 
DB2 for z/OS Bufferpool Tuning win by Divide and Conquer or Lose by Multiply ...
DB2 for z/OS Bufferpool Tuning win by Divide and Conquer or Lose by Multiply ...DB2 for z/OS Bufferpool Tuning win by Divide and Conquer or Lose by Multiply ...
DB2 for z/OS Bufferpool Tuning win by Divide and Conquer or Lose by Multiply ...John Campbell
 

What's hot (20)

Z OS IBM Utilities
Z OS IBM UtilitiesZ OS IBM Utilities
Z OS IBM Utilities
 
IBM DB2 for z/OS Administration Basics
IBM DB2 for z/OS Administration BasicsIBM DB2 for z/OS Administration Basics
IBM DB2 for z/OS Administration Basics
 
Parallel Sysplex Implement2
Parallel Sysplex Implement2Parallel Sysplex Implement2
Parallel Sysplex Implement2
 
Mainframe IPL Process.pdf
Mainframe IPL Process.pdfMainframe IPL Process.pdf
Mainframe IPL Process.pdf
 
Upgrade to zOS V2.5 - Planning and Tech Actions.pdf
Upgrade to zOS V2.5 - Planning and Tech Actions.pdfUpgrade to zOS V2.5 - Planning and Tech Actions.pdf
Upgrade to zOS V2.5 - Planning and Tech Actions.pdf
 
I Didn't Know You Could Do That with zOS.pdf
I Didn't Know You Could Do That with zOS.pdfI Didn't Know You Could Do That with zOS.pdf
I Didn't Know You Could Do That with zOS.pdf
 
DB2 for z/OS Architecture in Nutshell
DB2 for z/OS Architecture in NutshellDB2 for z/OS Architecture in Nutshell
DB2 for z/OS Architecture in Nutshell
 
Tso and ispf
Tso and ispfTso and ispf
Tso and ispf
 
A First Look at the DB2 10 DSNZPARM Changes
A First Look at the DB2 10 DSNZPARM ChangesA First Look at the DB2 10 DSNZPARM Changes
A First Look at the DB2 10 DSNZPARM Changes
 
Best practices for DB2 for z/OS log based recovery
Best practices for DB2 for z/OS log based recoveryBest practices for DB2 for z/OS log based recovery
Best practices for DB2 for z/OS log based recovery
 
Db2
Db2Db2
Db2
 
IP Routing on z/OS
IP Routing on z/OSIP Routing on z/OS
IP Routing on z/OS
 
zOSMF SDSF_ShareLab_V2R5.pdf
zOSMF SDSF_ShareLab_V2R5.pdfzOSMF SDSF_ShareLab_V2R5.pdf
zOSMF SDSF_ShareLab_V2R5.pdf
 
IBM SMP/E
IBM SMP/EIBM SMP/E
IBM SMP/E
 
DB2 for z/OS and DASD-based Disaster Recovery - Blowing away the myths
DB2 for z/OS and DASD-based Disaster Recovery - Blowing away the mythsDB2 for z/OS and DASD-based Disaster Recovery - Blowing away the myths
DB2 for z/OS and DASD-based Disaster Recovery - Blowing away the myths
 
Presentation db2 connections to db2 for z os
Presentation   db2 connections to db2 for z osPresentation   db2 connections to db2 for z os
Presentation db2 connections to db2 for z os
 
Mainframe interview
Mainframe interviewMainframe interview
Mainframe interview
 
z16 zOS Support - March 2023 - SHARE in Atlanta.pdf
z16 zOS Support - March 2023 - SHARE in Atlanta.pdfz16 zOS Support - March 2023 - SHARE in Atlanta.pdf
z16 zOS Support - March 2023 - SHARE in Atlanta.pdf
 
IBM z/OS Communications Server z/OS Encryption Readiness Technology (zERT)
IBM z/OS Communications Server z/OS Encryption Readiness Technology (zERT)IBM z/OS Communications Server z/OS Encryption Readiness Technology (zERT)
IBM z/OS Communications Server z/OS Encryption Readiness Technology (zERT)
 
DB2 for z/OS Bufferpool Tuning win by Divide and Conquer or Lose by Multiply ...
DB2 for z/OS Bufferpool Tuning win by Divide and Conquer or Lose by Multiply ...DB2 for z/OS Bufferpool Tuning win by Divide and Conquer or Lose by Multiply ...
DB2 for z/OS Bufferpool Tuning win by Divide and Conquer or Lose by Multiply ...
 

Viewers also liked

CA ACF2™ and CA Top Secret® Part 1: The Road Leading to r16 and Capabilities ...
CA ACF2™ and CA Top Secret® Part 1: The Road Leading to r16 and Capabilities ...CA ACF2™ and CA Top Secret® Part 1: The Road Leading to r16 and Capabilities ...
CA ACF2™ and CA Top Secret® Part 1: The Road Leading to r16 and Capabilities ...CA Technologies
 
Db2 zos-sharing
Db2 zos-sharingDb2 zos-sharing
Db2 zos-sharingwetwind55
 
How To Master PACBASE For Mainframe In Only Seven Days
How To Master PACBASE For Mainframe In Only Seven DaysHow To Master PACBASE For Mainframe In Only Seven Days
How To Master PACBASE For Mainframe In Only Seven DaysSrinimf-Slides
 
FlashCopy and DB2 for z/OS
FlashCopy and DB2 for z/OSFlashCopy and DB2 for z/OS
FlashCopy and DB2 for z/OSFlorence Dubois
 
Examinable Question and answer system programming
Examinable Question and answer system programmingExaminable Question and answer system programming
Examinable Question and answer system programmingMakerere university
 
Planning and executing a DB2 11 for z/OS Migration by Ian Cook
Planning and executing a DB2 11 for z/OS  Migration  by Ian Cook Planning and executing a DB2 11 for z/OS  Migration  by Ian Cook
Planning and executing a DB2 11 for z/OS Migration by Ian Cook Surekha Parekh
 

Viewers also liked (10)

Summary session 5
Summary session 5Summary session 5
Summary session 5
 
CA ACF2™ and CA Top Secret® Part 1: The Road Leading to r16 and Capabilities ...
CA ACF2™ and CA Top Secret® Part 1: The Road Leading to r16 and Capabilities ...CA ACF2™ and CA Top Secret® Part 1: The Road Leading to r16 and Capabilities ...
CA ACF2™ and CA Top Secret® Part 1: The Road Leading to r16 and Capabilities ...
 
Db2 zos-sharing
Db2 zos-sharingDb2 zos-sharing
Db2 zos-sharing
 
How To Master PACBASE For Mainframe In Only Seven Days
How To Master PACBASE For Mainframe In Only Seven DaysHow To Master PACBASE For Mainframe In Only Seven Days
How To Master PACBASE For Mainframe In Only Seven Days
 
FlashCopy and DB2 for z/OS
FlashCopy and DB2 for z/OSFlashCopy and DB2 for z/OS
FlashCopy and DB2 for z/OS
 
Narayanan Doraiswamy Resume
Narayanan Doraiswamy ResumeNarayanan Doraiswamy Resume
Narayanan Doraiswamy Resume
 
Examinable Question and answer system programming
Examinable Question and answer system programmingExaminable Question and answer system programming
Examinable Question and answer system programming
 
IBM MQ Series For ZOS
IBM MQ Series For ZOSIBM MQ Series For ZOS
IBM MQ Series For ZOS
 
100 sql queries
100 sql queries100 sql queries
100 sql queries
 
Planning and executing a DB2 11 for z/OS Migration by Ian Cook
Planning and executing a DB2 11 for z/OS  Migration  by Ian Cook Planning and executing a DB2 11 for z/OS  Migration  by Ian Cook
Planning and executing a DB2 11 for z/OS Migration by Ian Cook
 

Similar to DB2 Systems Programming Tools of the Trade NA07B03

OpenPOWER Application Optimization
OpenPOWER Application Optimization OpenPOWER Application Optimization
OpenPOWER Application Optimization Ganesan Narayanasamy
 
How To Start Up With PHP In IBM i
How To Start Up With PHP In IBM iHow To Start Up With PHP In IBM i
How To Start Up With PHP In IBM iSam Pinkhasov
 
How To Start Up With Php In Ibm I
How To Start Up With Php In Ibm IHow To Start Up With Php In Ibm I
How To Start Up With Php In Ibm IAlex Frenkel
 
Your Inner Sysadmin - LonestarPHP 2015
Your Inner Sysadmin - LonestarPHP 2015Your Inner Sysadmin - LonestarPHP 2015
Your Inner Sysadmin - LonestarPHP 2015Chris Tankersley
 
Sitnl erp sec-2011
Sitnl erp sec-2011Sitnl erp sec-2011
Sitnl erp sec-2011jvandevis
 
Simple Scalar Simulator of ACD Familiariation Labratory Manual
Simple Scalar Simulator of ACD Familiariation Labratory ManualSimple Scalar Simulator of ACD Familiariation Labratory Manual
Simple Scalar Simulator of ACD Familiariation Labratory Manualzelalem2022
 
SHARE_MgmtServicesCatalog.pdf
SHARE_MgmtServicesCatalog.pdfSHARE_MgmtServicesCatalog.pdf
SHARE_MgmtServicesCatalog.pdfMarna Walle
 
Sap security online training
Sap security online trainingSap security online training
Sap security online trainingsapscmit
 
Hints for a successful hfs to zfs migration
Hints for a successful hfs to zfs migrationHints for a successful hfs to zfs migration
Hints for a successful hfs to zfs migrationsatish090909
 
SSAdaP 1989 DECUS Europe Symposium Jan Holy
SSAdaP 1989 DECUS Europe Symposium Jan HolySSAdaP 1989 DECUS Europe Symposium Jan Holy
SSAdaP 1989 DECUS Europe Symposium Jan HolyJan Holy
 
Premier integration with logix, pf drives and ft view (pf755)
Premier integration with logix, pf drives and ft view (pf755)Premier integration with logix, pf drives and ft view (pf755)
Premier integration with logix, pf drives and ft view (pf755)confidencial
 

Similar to DB2 Systems Programming Tools of the Trade NA07B03 (20)

Hotsos Advanced Linux Tools
Hotsos Advanced Linux ToolsHotsos Advanced Linux Tools
Hotsos Advanced Linux Tools
 
OpenPOWER Application Optimization
OpenPOWER Application Optimization OpenPOWER Application Optimization
OpenPOWER Application Optimization
 
R12.2 dba
R12.2 dbaR12.2 dba
R12.2 dba
 
SAP LVM Customer Instances
SAP LVM Customer InstancesSAP LVM Customer Instances
SAP LVM Customer Instances
 
SAP LVM Custom Instances
SAP LVM Custom InstancesSAP LVM Custom Instances
SAP LVM Custom Instances
 
How To Start Up With PHP In IBM i
How To Start Up With PHP In IBM iHow To Start Up With PHP In IBM i
How To Start Up With PHP In IBM i
 
How To Start Up With Php In Ibm I
How To Start Up With Php In Ibm IHow To Start Up With Php In Ibm I
How To Start Up With Php In Ibm I
 
Your Inner Sysadmin - LonestarPHP 2015
Your Inner Sysadmin - LonestarPHP 2015Your Inner Sysadmin - LonestarPHP 2015
Your Inner Sysadmin - LonestarPHP 2015
 
Ibm db2 case study
Ibm db2 case studyIbm db2 case study
Ibm db2 case study
 
Linux on System z the Toolchain in a Nutshell
Linux on System z the Toolchain in a NutshellLinux on System z the Toolchain in a Nutshell
Linux on System z the Toolchain in a Nutshell
 
IBM Utilities
IBM UtilitiesIBM Utilities
IBM Utilities
 
Sitnl erp sec-2011
Sitnl erp sec-2011Sitnl erp sec-2011
Sitnl erp sec-2011
 
Simple Scalar Simulator of ACD Familiariation Labratory Manual
Simple Scalar Simulator of ACD Familiariation Labratory ManualSimple Scalar Simulator of ACD Familiariation Labratory Manual
Simple Scalar Simulator of ACD Familiariation Labratory Manual
 
SHARE_MgmtServicesCatalog.pdf
SHARE_MgmtServicesCatalog.pdfSHARE_MgmtServicesCatalog.pdf
SHARE_MgmtServicesCatalog.pdf
 
Drupal development
Drupal development Drupal development
Drupal development
 
Sap security online training
Sap security online trainingSap security online training
Sap security online training
 
SAP Basis Overview
SAP Basis OverviewSAP Basis Overview
SAP Basis Overview
 
Hints for a successful hfs to zfs migration
Hints for a successful hfs to zfs migrationHints for a successful hfs to zfs migration
Hints for a successful hfs to zfs migration
 
SSAdaP 1989 DECUS Europe Symposium Jan Holy
SSAdaP 1989 DECUS Europe Symposium Jan HolySSAdaP 1989 DECUS Europe Symposium Jan Holy
SSAdaP 1989 DECUS Europe Symposium Jan Holy
 
Premier integration with logix, pf drives and ft view (pf755)
Premier integration with logix, pf drives and ft view (pf755)Premier integration with logix, pf drives and ft view (pf755)
Premier integration with logix, pf drives and ft view (pf755)
 

DB2 Systems Programming Tools of the Trade NA07B03

  • 1. 1 May 7, 2007 1:40 p.m. – 2:40 p.m. Platform: z/OS Mainframe DB2 Systems Programming Tools of the Trade Linda Hagedorn Performance and Tuning Experts Session: B03
  • 2. 2 2 Linda Hagedorn Performance & Tuning Experts Linda.Hagedorn@Ireland.com Session: B03 DB2 Systems Programming Tools of the Trade
  • 3. 3 3 Introduction • DB2 Systems Programming requires knowledge across products and platforms. This presentation includes the tools you need to understand, manage, and control mainframe z/OS interaction with UDB DB2. • This presentation is operationally based – how things are done, and why.
  • 4. 4 4 Questions and Notes • Ask questions as we go along. • I’ll repeat the questions for clarity. • If you need answers further explained, say so. • An interactive audience is welcome • All examples in the presentation have links to manuals on the notes pages. • MVS, os/390, and z/OS are used interchangeably. • ‘Systems programmer’ is abbreviated as sysprog.
  • 5. 5 5 DB2’s Connections in z/OS • IPLINFO to SYS1.PARMLIB • SYS1.PARMLIB • APFxx • SCHEDxx • IEFSSNxx • PROGxx • SSVT – Subsystem Vector Table • PPT – Program Properties Table • Console Dump Information • SLIPS • SYS1l.LOGREC • DFSMS Storage Mgmt • ACS routines • SMF • Live access – MANx • Archive access • IFCID and SMF Mapping
  • 6. 6 6 IPLINFO to SYS1.PARMLIB • SYS1.PARMLIB is the generic name of the PDS containing parameters that bring up the controls for z/OS. • DB2 UDB’s connections are recorded in SYS1.PARMLIB or another concatenated PARMLIB. • At IPL (Initial Program Load), the parameters are loaded and the system brought up,. • Often the path is through SYS1.PARMLIB(*00) members, but you cannot be sure. • How can the path be determined?
  • 7. 7 7 Decoding the Path - IPLINFO • From the console, /D IPLINFO IEASYM LIST refers to the suffix of IEASYMxx members in SYS1.PARMLIB. This IPL will use SYS1.PARMLIB(IEASYMD0). IEASYS LIST likewise refers to suffixes, this time of IEASYSxx members. We have two here, concatenated: SYS1.PARMLIB(IEASYSD0) AND (IEASYSOP). Note the 5th line. This is where IPL starts. SYS0 IPLPARM(LOADD0) on unit
  • 8. 8 8 Decoding the Path – IPLPARM UNIT • =3.4 to find the PDS SYS0.IPLPARM • Often the dataset is uncataloged; if so, then locate the volume, and then =3.4. The book containing z/OS commands is found here: http://publib.boulder.ibm.com/cgi- bin/bookmgr/BOOKS/IEA2G170/CCONTENTS?SHELF=iea2bk70&DN=SA22- 7627-14&DT=20060616012438 The z/OS V1R8.0 MVS Bookshelf is here: http://publib.boulder.ibm.com/cgi- bin/bookmgr/Shelves/iea2bk70
  • 9. 9 9 Decoding the path – LOADxx contents IODF gives the external name of the IO Definition file: SYS1.IODF01 01 is the suffix. SYSCAT contains the name of the Master Catalog. Col 1-6 SYSCAT 10-15 Vol ser containing the master cat 16 ‘1’ unless SYS% to SYS1 conversion is active, then it is a ‘2’ 17 Alias level of qualification (default 1) 18-19 CAS service task lower limit, default x’3C’ The next three are suffixes of members in SYS1.PARMLIB. The PARMLIB are the concatenated PARMLIBs in use by MVS.
  • 10. 10 10 Decoding the path - IEASYSxx • IEASYSxx contains a list of suffixes, pointing to other SYS1.PARMLIB members. DB2 UDB information is stored in several of these members. • IEFSSNxx contains the entries for subsystems. • PROGxx contains APF (Authorized Program Facilities) and LNKLST (Linklist) entries. • SCHEDxx contains overrides to the PPT. • IEAAPFxx (APF entries) • LNKLSTxx (Linklist) • LOGREC= is the name of the logrec file. DB2 information is shipped in z/OS’s PPT (Program Properties Table). The SCHED entry would override the PPT. This is for informational purposes only. The PPT shipped with z/OS does not need an override. IEAAPFxx and LNKLSTxx are still operational, but entries can be made to the PROGxx member instead. PROGxx is being used instead of IEAAPFxx and LNKLSTxx in many, if not most, shops.
  • 11. 11 11 Updates to SYS1.PARMLIB • z/OS commands can be used to add subsystems and libraries on the fly, enabling work to move forward instead of waiting for an IPL. • IEFSSNxx – use z/OS command: SETSSI • PROGxx – use z/OS command: SETPROG for APF and LNKLST • SCHEDxx – use z/OS command: SET SCH • Update SYS1.PARMLIB separately. • Syntax for the commands is found in the ‘z/OS MVS Systems Command Manual.’ The book containing z/OS commands is found here: http://publib.boulder.ibm.com/cgi- bin/bookmgr/BOOKS/IEA2G170/CCONTENTS?SHELF=iea2bk70&DN=SA22- 7627-14&DT=20060616012438 The z/OS V1R8.0 MVS Bookshelf is here: http://publib.boulder.ibm.com/cgi- bin/bookmgr/Shelves/iea2bk70
  • 12. 12 12 IEFSSNxx – SETSSI Command • SETSSI {ADD,{SUBNAME|SUB|S}=subname [,{CONSNAME|C}=consname] [,{INITRTN|I}=initrtn[,{INITPARM|P}=initparm]]} {DEACTIVATE|DEACT} ,{SUBNAME|SUB|S}=subname} {ACTIVATE|ACT},{SUBNAME|SUB|S}=subname } • To add a DB2 subsystem from the console: SETSSI ADD,SUBNAME=ssname,I=DSN3INI, P='DSN3EPX,-DBP1,S,DBP0’ DBP0'Example of SETSSI command syntax from z/OS MVS Systems Commands Manual V1R8.0 http://publib.boulder.ibm.com/cgi- bin/bookmgr/BOOKS/IEA2G170/4.49.1?SHELF=iea2bk70&DT=20060616012438 &CASE= Example of IEFSSNxx entry from DB2 UDB R810 Install Manual http://publib.boulder.ibm.com/cgibin/bookmgr/BOOKS/DSNIGJ13/2.6.1.1?SHELF =dsnshja2&DT=20050324144101 &CASE=•SUBSYS SUBNAME(ssname) INITRTN(DSN3INI) INITPARM('DSN3EPX,prefix<,scope<,group-attach>> '
  • 13. 13 13 PROGxx – SETPROG APF LNKLST • SETPROG APF{,FORMAT={DYNAMIC|STATIC}} {,{ADD|DELETE},DSNAME|LIBRARY=libname,{SMS |VOLUME=volume} } • To add a SMS-managed SDSNLOAD to the APF authorized list from the console: SETPROG APF,ADD,DSNAME=DSN810.SDSNLOAD,SMS Setprog command is found in the MVS System Commands http://publib.boulder.ibm.com/cgi- bin/bookmgr/BOOKS/IEA2G170/4.44?SHELF=iea2bk70&DT=20060616012438
  • 14. 14 14 Display APF and LNKLST • The APF authorized, and linklisted libraries can be displayed from the console. • To display APF • D PROG,APF • To display LNKLST • D PROG,LNKLST D PROG, APF command is found: http://publib.boulder.ibm.com/cgi- bin/bookmgr/BOOKS/IEA2G170/4.10.41?SHELF=iea2bk70&DT=2006061601243 8#HDRD3PROG D PROG,LNKLST command is found: http://publib.boulder.ibm.com/cgi- bin/bookmgr/BOOKS/IEA2G170/4.10.43?SHELF=iea2bk70&DT=2006061601243 8
  • 15. 15 15 Display PARMLIB • /D PARMLIB to display the order of the parmlibs
  • 16. 16 16 SSVT – Subsystem Vector Table • IRLM should not be forced due to the operation of the SSVT. • NIP (Nucleus Initialization Program) executes SDSNLINK ERLY code at IPL to create entries in the SSVT. • If IRLM is MVS FORCEd down, SSVT is not cleaned up, and there is no way to manually clean it up. • If DB2 tries to come up, it thinks that IRLM is still running and will not start. • The only way to reestablish the SSVT entry for the forced IRLM is to IPL. • Alternatively, by defining a 2nd IRLM, change ZPARMs and the IRLM startup proc to point to the new name, DB2 can be brought up with the alternate IRLM. • MVS CANCEL can be used on IRLM, but not FORCE. F DBxxIRLM,STATUS to determine the status of IRLM If MVS FORCE is used, and an alternate IRLM is connected in zparm, the original IRLM cannot be used until an IPL is done to clean up the SSVT.
  • 17. 17 17 IRLM shutdown, MVS commands • Normal sequence: • Shutdown of DB2 usually stops IRLM. • /STOP irlmproc • /MODIFY irlmproc,ABEND or /F irlmproc,ABEND,DUMP • /CANCEL irlmproc • Avoid if at all possible. If entered, this command requires an IPL to clean up SSVT • /FORCE irlmproc
  • 18. 18 18 PPT Program Properties Tables • z/OS is shipped with the PPT populated. • The PPT contains among other things, the Protect Key – a memory protection mechanism. • Lower numbers can write in higher number areas. Higher numbers cannot write in lower number areas. • The operating system runs in key 0. • Access method services runs in key 5. • CICS and DB2 run in key 7. • Applications run in 8. The populated PPT is documented in the z/OS V1R8.0 MVS Initialization and Tuning Reference found here: http://publib.boulder.ibm.com/cgi- bin/bookmgr/BOOKS/iea2e270/68.7?ACTION=MATCHES&REQUEST=ppt&TY PE=FUZZY&SHELF=iea2bk70&DT=20060710234538&CASE=&searchTopic=T OPIC&searchText=TEXT&searchIndex=INDEX&rank=RANK&ScrollTOP=FIRS THIT#FIRSTHIT
  • 19. 19 19 Synonym Meaning SCHEDxx keyword NC Non-cancelable NOCANCEL NS Non-swappable NOSWAP PR Privileged PRIV ST System task SYST ND No data set integrity NODSI BP Bypass password protection NOPASS Key PSW key for this program KEY(x) Proc Affinity Processors eligible AFF(y) 2P Second level preferred storage SPREF 1P First level preferred storage LPREF NP No preferred storage NOPREF
  • 20. 20 20 Protect Key and the PSW • In a PSW (Program Status Word), the third position is the protect key: PSW 077D0000 A242B10A Protect key 7 (DB2) PSW 078D0000 80A7328C Protect key 8 (problem program) Problem program (application code) runs with the least protection. If this message is displayed, the application has been dropped from it’s key to key 8, or lost other PPT attributes: IEF188I PROBLEM PROGRAM ATTRIBUTES ASSIGNED The Program Properties Table in DB2 UDB R810 is found here: http://publib.boulder.ibm.com/cgi- bin/bookmgr/BOOKS/IEA2E270/68.7?SHELF=iea2bk70&DT=20060710234538
  • 21. 21 21 PSW Protect Keys and APF • Programs listed in the PPT will run in the assigned key, unless something with a higher key is included in their execution libraries on steplib or joblib, or if the required library is not APF-authorized. • Including a higher key library will cause all libraries in the concatenation ot be assigned to the highest number. • Programs requiring a lower number will likely have problems executing – S0C4, S047, etc. • To easily identify the source of the problem, know that DB2 PSW is key 7. If the error PSW is 078, you know something is wrong with the execution libraries.
  • 22. 22 22 Questions • We covered IPLPARMs, SYS1.PARMLIB, APF, SCHED, LNKLST, SSVT, PPT, PSW and protect keys. • Any questions?
  • 23. 23 23 Console Dump Info – SYS1.DAE • Systems dump occasionally – slipped, on their own, or forced. • SYS1.DAE is the dump suppression mechanism shipped with MVS to save the overhead of duplicate dumping. • When a product dumps, a symptom string is built and SYS1.DAE is checked to see if it’s already dumped. If the symptom string matches, the dump is suppressed.
  • 24. 24 24 Console Dump Info – SYS1.DAE • If the symptom string isn’t present, the dump is taken and the string added to SYS1.DAE. • If SYS1.DAE is suppressing a dump you need, edit it and delete the line containing the symptom string.
  • 25. 25 25 Dumps – Slip management • Slips cause a dump to be taken when certain criteria is set. • Slips are set from the console. • They can be enabled, set to run multiple times, disabled, and deleted from the system.
  • 26. 26 26 Setting Slips • The syntax is – • SLIP SET,[options],END • This example will set a slip, name it MA01, looking for a system abend 0C7, in job MA01B55, abend type SVC. • SLIP SET,ID=MA01,C=0C7,J=MA01B55,A=SVCD,E • The ‘E’ terminates the slip command. Matchlim is the number of times it will fire, and if not specified, will default to once.
  • 27. 27 27 Setting Slips • This example names the slip QA01, gives us an SVC dump for a system abend 04E on a specific DB2 reason code, matchlim is 3 (will fire 3 times), and an E to end. • SET,ID=QA01,A=SVCD,C=04E,REASON=00C90301 ,ML=3,E
  • 28. 28 28 Setting slips – parameters • SET,ID=QA01,A=SVCD,C=04E,REASON=00C90301,ML=3,E • System abends are coded C=xxxx. • User abends are coded C=Uxxxx. • Matchlim (abbreviated ML) is useful if you have to take multiple dumps of a reoccurring problem, usually because you’re working with MVS increasing the dump dataset size.
  • 29. 29 29 Slips - Displaying • Display all slips • /D SLIP ID STATE ID STATE ZA14 ENABLED XB37 ENABLED U775 ENABLED MA01 ENABLED • Display the characteristics of a named slip • /D SLIP=MA01
  • 30. 30 30 Slips – Enable, Disable, Delete • Enable a previously disabled (or fired) slip SLIP MOD,ID=xxxx,EN • Disable a previously enabled slip SLIP MOD,ID=xxxx,D • Delete a slip SLIP DEL,ID=xxxx Slip commands are found in the z/OS Systems Commands http://publib.boulder.ibm.com/cgi- bin/bookmgr/BOOKS/IEA2G170/4.52?SHELF=iea2bk70&DT=20060616012438 Syntax diagram is here: http://publib.boulder.ibm.com/cgi- bin/bookmgr/BOOKS/IEA2G170/4.52.5.3?SHELF=iea2bk70&DT=200606160124 38#HDRSIACT
  • 31. 31 31 Console Dump Info IEA611I COMPLETE DUMP ON N848S1.SYSA.D060214.T034543.DB2YDIST.S00005 IEE854I 03.47.27 SYS1.DUMP ERRDATA 393 SYS1.DUMP DATA SETS AVAILABLE=000 AND FULL=000 CAPTURED DUMPS=0000, SPACE USED=00000000M, SPACE FREE=00002500M MSDUMP.SYSD.D060214.T034543.DTADDIST.S00005 TITLE=DTAD, ABND=04E-00E70005,U=N99999 ,C=XYR00.710.LOCN=199.99.999.9 ,LOC=DSNXGRDS.DSNXGTRE:M120 DUMP TAKEN TIME=03.46.08 DATE=02/14/2007 ERRORID=SEQ63621 CPU0042 ASID00B9 TIME=03.45.40 SYSTEM ABEND CODE=04E REASON CODE=00E70005 MODULE=DSNXGRDS CSECT=DSNXGTRE PSW AT TIME OF ERROR=477C1000 A998AA2E ILC=2 INT=0D TRANSLATION EXCEPTION ADDR=00584000 ABENDING PROGRAM ADDR=******** RECOVERY ROUTINE=DSNTFRCV GPR 0-3 00000004 0004E000 00000015 6512373F GPR 4-7 506147E0 00000015 1A7EB418 60557950 GPR 8-11 00000008 00000002 65123728 A998A450 GPR12-15 2998B44F 65123500 A998AA20 00E70005
  • 32. 32 32 Console Dump Info – IEAx11 • On the console, look for the message to determine if the dump was complete or not. • IEA911 if the dump goes to SYS1.DUMPxx datasets • IEA622 if the dump goes to dynamically allocated datasets. • Incomplete dumps are seldom useful for problem diagnosis. Another dump may be needed.
  • 33. 33 33 Console Dump Info – IEAx11 • The dump message will also tell you if the dump dataset is too small. • MVS Systems Programmers will reallocate the dump datasets large enough to hold the dump.
  • 34. 34 34 Dump Info – SDSF DUMPSRV • There are several ways to determine if the system is dumping, besides it being slow. • SDSF - DUMPSRV will be running when the system is dumping. • In SDSF, PRE DUMPSRV* and look for the running address space. • Dumps move from DUMPSRV to the SYS1.DUMPxx or dynamically allocated datasets, then to a final location and name.
  • 35. 35 35 Dump Info – D D,ERRDATA D D,ERRDATA IEE854I 15.36.37 SYS1.DUMP ERRDATA 665 SYS1.DUMP DATA SETS AVAILABLE=004 AND FULL=001 CAPTURED DUMPS=0000, SPACE USED=00000000M, SPACE FREE=00001000M DUMP02 TITLE=#1 OF 4 SPXRCM97 DUMP TAKEN TIME=14.49.54 DATE=01/16/06 NO DUMP DATA AVAILABLE FOR THE FOLLOWING EMPTY SYS1.DUMP DATA SETS: 01,03-05 Very, very useful command for determining the ability of DUMPSRV to handle a dump, if it’s busy, how much space is available, and if dumps are in process to roll over to their destination.
  • 36. 36 36 Dump Info – D D,ERRDATA • This tells us we have one dump in the SYS1.DUMPxx datasets that has not yet been written to the dump manager datasets. SYS1.DUMP DATA SETS AVAILABLE=004 AND FULL=001 • This tells us that space used is 0, meaning the DUMPSRV has room to take another dump. The full dump in the SYS1.DUMPxx dataset does not count against the DUMPSRV available space. CAPTURED DUMPS=0000, SPACE USED=00000000M, SPACE FREE=00001000M
  • 37. 37 37 Dump Info – D D,ERRDATA • This is the title of the dump that’s waiting to move from the SYS1.DUMPxx dataset to disk, and the list of empty SYS1.DUMPxx datasets. DUMP02 TITLE=#1 OF 4 SPXRCM97 DUMP TAKEN TIME=14.49.54 DATE=01/16/96 NO DUMP DATA AVAILABLE FOR THEFOLLOWING EMPTY SYS1.DUMP DATA SETS: 01,03-05
  • 38. 38 38 Dump command, D D,T • /D D,T will display the dumps and titles. IEE853I 13.59.47 SYS1.DUMP TITLES SYS1.DUMP DATA SETS AVAILABLE=000 AND FULL=000 CAPTURED DUMPS=0000, SPACE USED=00000000M, SPACE FREE=00000500M SYS1.DUMP.D070303.T192346.L06RS005.S00001 TITLE=ENF ABEND ERRORMOD=IEFENFNM DUMP TAKEN TIME=15.23.50 DATE=03/03/07 NO DUMP DATA AVAILABLE FOR 004 AUTOMATICALLY ALLOCATED DUMP DATA SETS
  • 39. 39 39 Questions – Dump Info • Any questions before we leave dumps?
  • 40. 40 40 SYS1.LOGREC • Logrec is a z/OS central repository for error, informational, and statistical records from software and hardware. • Most it not all products write to logrec. • Dumps write corresponding records to SYS1.LOGREC as the software percolates through the dump process. • The DUMP ERRORID can be found in it’s matching LOGRECS. • Logrecs are written to default SYS1.LOGREC, but the destination can be tailored. Often it’s tailored as SYS1.<lpar>.LOGREC. • Logrecs roll over to daily, weekly, monthly files driven either by time or as SYS1.LOGREC is filled. EREP bookshelf: http://publib.boulder.ibm.com/cgibin/bookmgr/Shelves/ifc5bk04
  • 41. 41 41 SYS1.LOGREC • EREP (Environmental Record Editing and Printing Program) reports can be run off the live files, an extract, or from the historical files. • SYS1.LOGREC is a time-based collection of rows. • The extract program is IFCOFFLD. • The report program is IFCEREP1. • EREP is executed with control cards to filter and extract records to a dataset for shipping to IBM, or printing to the spool.
  • 42. 42 42 SYS1.LOGREC – Extract and zero //P390OFFL JOB (),'SYS1.LOGREC OFFLOAD',CLASS=A,MSGCLASS=X, // NOTIFY=&SYSUID,TIME=1440,REGION=48M //STEP1 EXEC PGM=IFCOFFLD //SERLOG DD DSN=SYS1.LOGREC,DISP=OLD //ACCDEV DD DSN=P390.LOGREC1,DISP=(NEW,CATLG,CATLG), // SPACE=(TRK,(100,100),RLSE),UNIT=3390, // DCB=(RECFM=VB,BLKSIZE=6144),VOL=SER=OS39M1 //TOURIST DD SYSOUT=* ,DCB=BLKSIZE=133 //EREPPT DD SYSOUT=* ,DCB=BLKSIZE=133 //SYSIN DD DUMMY WARNING: • SYSIN is defaulting to ACC=Y and ZERO=Y to dump the ACC file and zero out SYS1.LOGREC. Note: This job will EMPTY SYS1.LOGREC. The logrecs will be moved to the ACCDEV DD. DDs for the HISTORICAL Extract are found here: http://publib.boulder.ibm.com/cgibin/bookmgr/BOOKS/IFC5G101/4.2?SHELF=ifc 5bk04&DT=19990120114558
  • 43. 43 43 SYS1.LOGREC – Report JCL //S0 EXEC PGM=IFCEREP1,REGION=1024K, // PARM='CARD' //SERLOG DD DISP=(OLD,KEEP),DSN=SYS1.LOGREC //ACCDEV DD DISP=(MOD,CATLG,CATLG),DSN=SYS1.LOGREC.HIST, // UNIT=SYSDA,SPACE=(CYL,(2,2)), // DCB=(RECFM=VB,BLKSIZE=6144) //DIRECTWK DD DISP=(NEW,DELETE),UNIT=SYSDA,SPACE=(CYL,2,,CONTIG) //EREPPT DD SYSOUT=*,DCB=BLKSIZE=133 //TOURIST DD SYSOUT=*,DCB=BLKSIZE=133 //SYSIN DD * ACC=N <-Copy SYS1.LOGREC? DATE=(06135),TIME=(1600-1630) PRINT=AL ZERO=N <-Zero out SYS1.LOGREC? Report parameters are found here: http://publib.boulder.ibm.com/cgibin/bookmgr/BOOKS/ifc5g101/2.3.1?SHELF=ifc 5bk04&DT=19990120114558
  • 44. 44 44 Replace with newer version. #2 This shows the LOGREC header – the ERRORID will match dump info from the console, if a dump was produced. The search argument string, failing load module and csect, abend code, reason code, etc. There may be many LOGRECs for a given failure as each component percolates through the dump process.
  • 46. 46 46 SYS1.LOGRECs correlate to the DB2 Diagnosis Guide • DB2 Logrecs contain the SDWA (System Diagnostic Work Area). • SDWA is formatted by EREP. • The codes and fields in SDWA are documented in the DB2 UDB Diagnosis Guide. In version 8, they start on page 207.
  • 47. 47 47 All the keys on a DB2 LOGREC formatted SDWAVRA are documented in the DB2 UDB Diagnosis Guide. x’06’ is the abend reason code x’CA’ is the subsystem name x’3A’ are address space ids Etc.
  • 48. 48 48
  • 49. 49 49 Questions – SYS1.LOGREC • Questions before we leave LOGREC?
  • 50. 50 50 DFSMS Storgroups • Many shops are now SMS Managed. • DASD are organized into STORGROUPS. This is different than DB2’s STOGROUP, but works functionally similar. • SMS writes ACS routines (Automatic Class Selection) routines to route datasets to certain STORGROUPS. • DB2 Stogroups can point to individual DASD, or ‘*’ meaning SMS-managed. z/OS V1R8.0 DFSMS Bookshelf http://publib.boulder.ibm.com/cgi- bin/bookmgr/Shelves/dgt2bk60 z/OS V1R8.0 DFSMS Storage Administration Management http://publib.boulder.ibm.com/cgi- bin/bookmgr/BOOKS/DGT2S250/CCONTENTS?SHELF=dgt2bk60&DN=SC26- 7402-06&DT=20060616125145
  • 51. 51 51 ACS Routines • ACS routines are usually managed through ISMF (Interactive Storage Manage Facility). Similar to ISPF panels. • The routines are translated into a SCDS (Source Control Data Set). • SCDS is a VSAM linear dataset. ACS management is found in the z/OS V1R8.0 DFSMS Storage Administration Reference chapter 10. http://publib.boulder.ibm.com/cgi- bin/bookmgr/BOOKS/DGT2S250/CCONTENTS?SHELF=dgt2bk60&DN=SC26- 7402-06&DT=20060616125145
  • 52. 52 52 ACS management is found in the z/OS V1R8.0 DFSMS Storage Administration Reference chapter 10. http://publib.boulder.ibm.com/cgi- bin/bookmgr/BOOKS/DGT2S250/CCONTENTS?SHELF=dgt2bk60&DN=SC26- 7402-06&DT=20060616125145
  • 53. 53 53 DFSMS – Lay of the Land • Sometimes SMS usage raises issues in DB2: dynamic allocation failure, severe SMS catalog errors. • DASD containing DB2 datasets can be on-line and available, but missing from the SMS catalog. • DB2’s call for a dataset is handed to SMS, but because the DASD is not in the STORGROUP, a severe SMS catalog error is reported to DB2. • These are the commands to see how the STORGROUPs are laid out – their names, contents (DASD volumes), and if the DASD appears in more than one STORGROUP. Recently a SMS change caused problems in DB2. Production user application partitions were unavailable; This message was reported in the DB2MSTR log: DSNB207I Dynamic allocation of dataset failed. Reason=97040000 DSNAME=xxxx. According to the Authorized Assembler Services Guide, 9704 is a class 7 Severe SMS Catalog service error. OS/390 210 Authorized Assembler Services Guide http://publib.boulder.ibm.com/cgibin/bookmgr/BOOKS/IEA1A 842/CCONTENTS?DT=20011024153852 Search for 9704, or 17zz. zz is what they use to substitutes characters in this book. In the case of the 9704, the datasets or partitions were not found in the SMS catalog, although the volumes were on-line, enabled, and the problem datasets could be found via ISPF 3.4.
  • 54. 54 54 DFSMS – Display STORGROUP • D SMS,SG(ALL) will list all the stogroups in the system. • D SMS,SG(xxxxxx),LISTVOL will list all the volumes in a stogroup. • D SMS,VOL(volser) will list all the stogroup(s) the vol appears in. These three commands will allow you to map DFSMS on your system.
  • 55. 55 55 D SMS,SG(ALL) D SMS,SG(ALL) IGD002I 14:50:27 DISPLAY SMS 302 STORGRP TYPE SYSTEM= 1 SGDBEL90 POOL + SGDBE90 POOL + SGDB2L90 POOL + SGDB2X90 POOL + SGDB2Z90 POOL + SGDB290 POOL + SGDUMMY DUMMY . SGEPRD90 POOL + SGETON90 POOL + SGETST90 POOL +
  • 56. 56 56 D SMS,SG(ALL) - Continued UPSCPM POOL + UPSSUPP POOL + UPSTSO POOL + ***************************** LEGEND ***************************** . THE STORAGE GROUP OR VOLUME IS NOT DEFINED TO THE SYSTEM + THE STORAGE GROUP OR VOLUME IS ENABLED - THE STORAGE GROUP OR VOLUME IS DISABLED * THE STORAGE GROUP OR VOLUME IS QUIESCED D THE STORAGE GROUP OR VOLUME IS DISABLED FOR NEW ALLOCATIONS ONLY Q THE STORAGE GROUP OR VOLUME IS QUIESCED FOR NEW ALLOCATIONS ONLY > THE VOLSER IN UCB IS DIFFERENT FROM THE VOLSER IN CONFIGURATION SYSTEM 1 = MVS1 The list of Storgroups is displayed followed by a character, and the legend is displayed at the end of the message.
  • 57. 57 57 D SMS,SG(SGDB2L90),LISTVOL IGD002I 14:53:58 DISPLAY SMS 207 STORGRP TYPE SYSTEM= 1 SGDB2L90 POOL + VOLUME UNIT SYSTEM= 1 STORGRP NAME DB2L20 + SGDB2L90 <snip> DB2L30 + SGDB2L90 DB2L31 + SGDB2L90 DB2L32 + SGDB2L90 DB2L33 + SGDB2L90 DB2L34 + SGDB2L90 DB2L35 + SGDB2L90 DB2L36 + SGDB2L90 DB2L37 + SGDB2L90 DB2L38 + SGDB2L90 ***************************** LEGEND ***************************** . THE STORAGE GROUP OR VOLUME IS NOT DEFINED TO THE SYSTEM + THE STORAGE GROUP OR VOLUME IS ENABLED - THE STORAGE GROUP OR VOLUME IS DISABLED > THE VOLSER IN UCB IS DIFFERENT FROM THE VOLSER IN CONFIGURATION SYSTEM 1 = MVS1
  • 58. 58 58 D SMS,VOL(volser) IGD002I 14:54:50 DISPLAY SMS 284 VOLUME UNIT SYSTEM= 1 STORGRP NAME DB2L25 + SGDB2L90 *********************** LEGEND *********************** . THE STORAGE GROUP OR VOLUME IS NOT DEFINED TO THE SYSTEM + THE STORAGE GROUP OR VOLUME IS ENABLED - THE STORAGE GROUP OR VOLUME IS DISABLED * THE STORAGE GROUP OR VOLUME IS QUIESCED
  • 59. 59 59 Questions - DFSMS • Any questions before leaving DFSMS?
  • 60. 60 60 SMF – System Management Facilities • SMF is a record collection mechanism in MVS. • SMF data is used for billing users, analyzing configuration, reporting DASD usage, etc. The information contained in SMF is extensive. • IBM products are assigned a SMF record number in which they can write their SMF data. • DB2 is assigned numbers 100, 101, and 102. • DB2’s IFCIDs are written into these SMF records. SMF Manuals are in the z/OS Shelf: http://publib.boulder.ibm.com/cgi- bin/bookmgr/BOOKS/IEA2G270/CCONTENTS?SHELF=iea2bk70&DN=SA22- 7630-13&DT=20060626104432
  • 62. 62 62 SMF – DB2’s IFCIDs • DB2 control blocks are dumped to IFCIDs periodically. • The IFCIDs chosen for writing are controlled by the trace command. • Several IFCIDs will be written to a single SMF record; as many as will fit on one page. • The SMF record has the standard SMF header pointing to the self-defining section, the IFCIDs, and the self-defining section. The header is x’1C’ in length. • Only one type of IFCID will be on a single SMF record.
  • 63. 63 63 SMF – MANx files • SMF writes into SYS.MANx files. • The files roll to daily, weekly, and monthly files, depending on how the MVS sysprogs set it up. • The live files can be accessed, as well as the historical. • Caution is called for when accessing the files live – if they are emptied, critical system information is lost. • Some of the basic examples in the book demonstrate how to empty the files, and as this has been done inadvertently in some shops, naturally MVS is concerned over any live access to the MANx files.
  • 64. 64 64 SMF – Display MANx Status • D SMF[,S|,O][,L={a|name|name-a}] COMMAND INPUT ===> /D SMF RESPONSE=DVLP IEE974I 15.53.37 SMF DATA SETS NAME VOLSER SIZE(BLKS) %FULL STATUS P-SYS1.MAN1.DVLP DVMAN1 37080 70 ACTIVE S-SYS1.MAN2.DVLP DVMAN1 37080 0 ALTERNATE S-SYS1.MAN3.DVLP DVMAN1 37080 0 ALTERNATE S-SYS1.MAN4.DVLP DVMAN1 37080 0 ALTERNATE S-SYS1.MAN5.DVLP DVMAN2 37080 0 ALTERNATE S-SYS1.MAN6.DVLP DVMAN2 37080 0 ALTERNATE http://publib.boulder.ibm.com/cgibin/bookmgr/BOOKS/IEA2G160/4.10.47?SHELF =iea2bk60&DT=20050714212238 S = dataset status O = SMF Options L = Display area or console name for the display. Defaults to the console log.
  • 65. 65 65 SMF – Live access and extract • This will extract DB2 IFCIDs from an active MANx file. //SMFEXTR EXEC PGM=IFASMFDP //SYSPRINT DD SYSOUT=* //INDD DD DSN=SYS1.MAN1.DVLP,DISP=SHR //OUTDD DD DSN=EXT1LH.DVLP.SMF.EXTRACT,DISP=(,CATLG), // DCB=(LRECL=32756,RECFM=VBS,BLKSIZE=0,DSORG=PS), // UNIT=SYSDA,SPACE=(CYL,(5,5)) //SYSIN DD * DATE(2007039,2007039) START(0900) END(1036) INDD(INDD,OPTIONS(DUMP)) OUTDD(OUTDD,TYPE(100,101,102)) /* The example does not purge or otherwise affect SMF. It runs an extract only.
  • 66. 66 66 SMF – Historical access • From the extract above, you can run dumps of the IFCIDs. • Alternatively, when the MANx files rollover, they will be in the historical files set up by MVS – daily, weekly, etc. • IDCAMS can be used to dump the records. • These are raw, so you can see the actual SMF record header, the self-defining area, and the IFCIDs.
  • 67. 67 67 SMF – Dumping the records • IDCAMS or DFSERA10 can be used to dump the extract //IDCAMS EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSUT1 DD DSN=EXT1LH.DVLP.SMF.EXTRACT, // DISP=SHR //SYSIN DD * PRINT IFILE(SYSUT1) DUMP
  • 68. 68 68 SMF – Dumping the records //S010 EXEC PGM=DFSERA10 //STEPLIB DD DSN=SLP41.APF.RESLIB,DISP=SHR //SYSPRINT DD SYSOUT=* //SYSUT1 DD DSN=EXT1LH.DVLP.SMF.EXTRACT,DISP=SHR //SYSIN DD * OPTION PRINT END • If SMF contains more than one DB2’s records, this print option will strip out the SMF records for the rows with the value at offset 19 (the subsystem name), DVLP in this example: OPTION PRINT OFFSET=19,FLDTYP=C,VALUE=DVLP,FLDLEN=4
  • 69. 69 69 SMF – ‘REVIEW’ – CBT Tape • On the CBT tape is a tool to read and format raw SMF data. It’s called ‘REVIEW’. • If your shop permits the CBT tools, download and install from www.cbttape.org. The instructions are on the site. • =3.4 to list the extract file, and in the command column, type ‘REVIEW’.
  • 70. 70 70 SMF – REVIEW – CBT Tape
  • 71. 71 71 SMF – FORMAT SMF • Type SMF on the command line and REVIEW will convert the raw data to readable data. It’s still SMF, so there’s no reporting or formatting, but you can see it.
  • 72. 72 72 Mapping IFCIDs to SMF • Mapping introduction is found in ADSNMACS(DSNWMSGS). • In DB2 UDB R810, it’s been moved to ADSNIVPD(DSNWMSGS). • This member also contains the cross reference between trace classes and ifcids – very valuable if you are looking for a specific IFCID and have to find the trace that writes it.
  • 73. 73 73 Mapping cross-reference These are the modules containing the maps to the IFCIDs. For example, 337 in R710 is for migration zparm PKGLDTOL (package load toleration). It would be mapped in DSNDQW04.
  • 74. 74 74 Trace type to SMF xref - DSNWMSGS
  • 75. 75 75 Recap DB2’s Connections in z/OS • IPLINFO to SYS1.PARMLIB • SYS1.PARMLIB • APFxx • SCHEDxx • IEFSSNxx • PROGxx • SSVT – Subsystem Vector Table • PPT – Program Properties Table • Console Dump Information • SLIPS • SYS1l.LOGREC • DFSMS Storage Mgmt • ACS routines • SMF • Live access – MANx • Archive access • IFCID and SMF Mapping
  • 76. 76 76 Thank you! If you’re interested in other DB2 Systems Programming sessions, let IDUG know. Write it on the session review form.
  • 77. 77 77 Session B03 DB2 Systems Programming – Tools of the Trade Linda Hagedorn Performance & Tuning Experts Linda.Hagedorn@Ireland.com