Natural 8.2 Upgrade and SYSRDC

June 26, 2012 | 1
Natural 8.2 upgrade experiences and a Review
of SYSRDC
Pieter Strydom
Sr. Principal Tech Support Analyst
May 2012
June 26, 2012 | 2
Agenda
• Natural 8.2 Upgrade
• Support experience
• Installation issues
• Some new features
• SYSRDC
• Changes
• Overview
• Uses
June 26, 2012 | 3
Before You Start
• Operating system and TP monitor requirements
• Release Notes
• IBM compatibility matrix on Empower
— Tested versions not listed in Release Notes
• Warning:
Although it may be technically possible to run a new version of Natural on
an old operating/teleprocessing system, Software AG cannot continue to
support operating/teleprocessing system versions that are no longer
supported by the system's provider.
• 1 year support needed for Software AG products
• IBM extending operating system support
— http://www-01.ibm.com/common/ssi/rep_ca/5/877/ENUSZP12-0025/ENUSZP120025.PDF
— 1 to 2 additional years
• Products
• End of maintenance
June 26, 2012 | 4
License Key Handling
• License key checking
• Standardized across products
• MLCvrs datasets
• LICUTIL
• Replaces NATLICAM (z/OS), NATLICAV (z/VSE)
• License key module
• LICMAIN - AMODE(ANY)
• LICMAINA – AMODE(31)
• JCL changes
• INCLUDE SMALIB(NATLIC) SAG LICENSE KEY
• INCLUDE MLCLIB(LICMAINA) LICENSE KEY PROGRAM
• Multiple includes in sample JCL
• Both modules only needed in shared nucleus
• License Keys
• Supplied by Logistics/Distribution
<- New
June 26, 2012 | 5
Natural System Files
• No new FNAT required
• NAT0866 Your Natural nucleus is not a Natural Security nucleus
• Run NSC LDEL and INPL before ERRLODUS
• FUSER sharing
• Requires NAT427 SP 5+
• Delete all NAT42 USRxxxN objects from FUSER
• Two options
1.
2.
NAT42: Copy USRxxxN objects to SYSTEM FNAT and
NAT82: Copy USRxxxN objects to SYSTEM FNAT
Add SYSEXT as a steplib in both nuclei
FNAT
FUSER
• Cannot execute a NAT82 object under NAT42
—
NAT1393 Object <name> (<lib>/<dbid>/<fnr>) cataloged with unsupported
version.
• SYSEXT options
1. Recommendation: Copy USRxxxN objects to SYSTEM FNAT
2. Add SYSEXT as a steplib
June 26, 2012 | 6
Sharing Components Across Versions
• FSEC, PSPOOL, FDIC sharing permitted
• FDIC - numeric fields with seven digits after decimal point or less
• Perform maintenance with higher version
• Bufferpool
• Cannot share between NAT42 and NAT82
• Multiple bufferpools per region or LPAR
• Use different SUBSID
• Roll server and ASM
Natural 82
Roll server
ASM
• Can share between NAT42 and NAT82
• Use highest version for both.
Natural 42
June 26, 2012 | 7
Object Code Only
• Source code advantages
•
•
•
•
Single source
Conditional assembly
Operating system/TP monitor/DBMS dependent modules
Compatibility
• Source code disadvantages
• Conditional assembly
— Return code 8 for CICS preprocessor
• Applying source changes
• More installation steps
• Custom changes
— Third party products
• Object code only since NAT82
• Batch (NATOS, NATVSE) and TSO (NATTSO) driver
• Future version
• Operating system/TP monitor/DBMS dependent interfaces
June 26, 2012 | 8
Parameter and NATPARM Changes
• Batch driver
• z/OS: OSP and macro NTOSP
• z/VSE: VSEP and macro NTVSEP
• TSO
• TSOP and macro NTTSOP
• Complete
• COMP and macro NTCOMP
• DB2
• DB2 and macro NTTDB2
• VSAM
• VSAM and macro NTVSAM
• Dynamic overrides now possible
• >> Source change corrections <<
June 26, 2012 | 9
Changes to installation
• Obsolete includes
—
—
—
—
—
INCLUDE NATLIB(NATMON) NATURAL MONITOR
INCLUDE NATLIB(NATBTCH) BATCH TERMINAL CONVERTER
INCLUDE NATLIB(NAT3270) 3270-SUPPORT
INCLUDE NATLIB(NAT3279) 3279-SUPPORT
INCLUDE NATLIB(NATWEB) NAT TERMINAL DRIVER FOR WEB IO
• Now part of module NATURAL
• JCL changes required compared to previous versions
• Job NATI060 optional includes
• INCLUDE SMALIB(NATO4I82) OPTIMIZE MONITOR BUFFER POOL
• Module name changes
• NATASM42 -> NATASM82
• NATRSM42 -> NATRSM82
• NATRPC63 -> NATRPC82
June 26, 2012 | 10
LE/370 Support
• LE370 parameter removed
• z/OS
—
—
—
—
INCLUDE NATLIB(NATOS)
INCLUDE NATLIB(NATOSL)
INCLUDE NATLIB(NATLEOPT)
ENTRY LESTART
Natural BATCH, must be first include
Support LE Load Modules
Support LE Object Modules <- Required
• z/VSE
—
—
—
—
INCLUDE NATVSE
INCLUDE NATVSEL
INCLUDE NATLEOPT
ENTRY LESTART
Natural BATCH, must be first include
LE front-end module for Natural BATCH driver
LE options for Natural BATCH driver <- Required
• LEHDLR – New parameter for z/OS
• Set to OFF for if needed for performance improvement
June 26, 2012 | 11
Code page support
• New ICS datasets
•
•
•
•
Standard code page support across products
ICSvrs supplied as separate datasets
NATICU, NATICUCV and NATICUCX obsolete
CFICU=OFF and CP=OFF
— SAGICU module ~ 7 MB
— Code page contents documented
• Unicode or Code page support - include either
— ICSDT40E ~ 3.6 MB
— ICSDT40X (z/OS only) ~ 14 MB
• Modules typically loaded dynamically
— RCA=SAGICU
— RCA=ICSDT40E CFICU=(DATFILE=ICSDT40E)
— RCA=ICSDT40X CFICU=(DATFILE=ICSDT40X)
• ICU bufferpool obsolete
June 26, 2012 | 12
INPL
• INPL process
•
•
•
•
INPL* programs linked to nucleus
INPL program executed from nucleus
INPL* programs loaded to FNAT
INTLIB executed at and of INPL
— SYSPROD update
• INPL using previous Natural version
• INPLDDM error
• NAT1393 Object cataloged with unsupported version
• Bufferpool
• Global vs. Local
• JCL changed since NAT413 to not use a Local bufferpool
• NAT1074 error with Global bufferpool
June 26, 2012 | 13
Natural System Files
• System file direct access
• Header record increase since NAT41
— 4th header if SRETAIN=OFF
• USR1054/USR1055
— Library list/Modules within library
• USR1057, USR2019
— Read Natural Source, Read/Write Natural Source
• USR4201
— Read/Write Natural Data areas
• USR1056/USR1058
— List/Read DDMs
• USR1035
— Editor interface
• Example in Empower
— Counting Application Source Lines
FNAT
FUSER
FDIC
FSEC
FSPOOL
June 26, 2012 | 14
Maintenance
• All Zaps
• NAT, NCI, NCF, NVS, NDB
• INPL (Natload) Service Packs
• NAT, NSC, NDV, NWO, PRD
• NAT and NSC must be applied at the same time
• Source Replacement Service Packs
• NCI
• Individual Source changes
• NAT
• Load Service Packs
• RPC, NWO
• Object Module Service Packs
• NDV (also see Natload corrections)
• SMA tables
• NAT822 and GLOBAL
June 26, 2012 | 15
SYSOBJH
• SYSTRANS and NATUNLD/NATLOAD obsolete
• Previous syntax honored
• New SYSOBJH command PROFILE
• Maintain SYSOBJH settings
• User specific settings
FUSER
• Compact mode
• Only two input screens
• Direct commands in batch recommended
• Wizard mode
• Use online screens for syntax
• Sample code for support
• Transfer format
• Fixed records, LRECL=96
• Transfer in ASCII
FUSER
June 26, 2012 | 16
SYSOBJH – Wizard Mode
10:26:43
***** Natural Object Handler *****
User DBA
- Unload Wizard -
2012-05-09
The following command will be processed.
To change the settings, press PF7 (Back). To confirm the settings and
to execute the command, press ENTER or PF8 (Next).
UNLOAD * LIB SYSTEM OBJTYPE N WHERE REPORT TRANSFER
June 26, 2012 | 17
SYSOBJH – PROFILE command
11:15:30
***** Natural Object Handler *****
User DBA
- SYSOBJH Profile -
2012-05-08
Library SYSTEM
General Settings
Cmd
Profile Parameter
Parameter Value
---
--------------------------------
----------------------------------------
__
Input-Mode
C
__
Display-Cmd-in-Advanced-Mode
N
__
Display-ExecutionMsg
N
__
Display-Statistics
N
__
Workplan-Library
WORKPLAN
__
Workplan-Library-DBID
0
__
Workplan-Library-FNR
0
__
Trace
N
__
Trace-Target
S
__
Option-Replace
N
__
Option-Transfer-Format
N
__
Option-Use-PC-Work-File
N
__
Option-TR-Include-Line-Numbers
N
__
Option-TR-Substitute
N
W = Use Wizard Mode (default)
A = Use Advance Mode
C = Use Compact Mode
June 26, 2012 | 18
SYSOBJH – Compact Mode Screen 1
11:05:41
***** Natural Object Handler *****
User DBA
- Compact Mode Main Menu -
2012-05-08
Function ................. U (U,L,S)
Object ................... L (L,E,C,R,D,F,A)
Work file format ......... I (I,T)
Use PC file .............. N (Y,N)
PC File .................. __________________________________________________
Write report ............. Y (Y,N)
Report text member ... ________
Set additional options ... _ (Y,N)
Use Option Workplan .. N (Y,N)
Option Workplan name . ________
Set global parameters .... _ (Y,N)
Use Parameter Workplan N (Y,N)
Param. Workplan name . ________
June 26, 2012 | 19
SYSOBJH – Compact Mode Screen 2
11:10:33
***** Natural Object Handler *****
User DBA
- Unload Natural Library Objects -
2012-05-08
Library ..... _________
DBID/FNR ..... _____
/ _____
New library
Passw./Ciph...
/
________
Object Types. NE_ (N,E,NE)
Object name . *________________________________
S/C-Kind .... A (S/C/A/W/B)
Natural types
*______________
User ID ..... _________
Progr. mode .
A
Date from ... __________
Date to .....
__________
Set number .. __
Set user/lib
________ / ________
Error number
Language codes *_______
0001 to 9999
S/L-Kind ..... A
(R/S/A)
(S/L/A)
_ Add/change details and exception criteria for selection
_ Change settings (options and parameters)
June 26, 2012 | 20
Miscellaneous Changes
• Objects cataloged with older versions
• Natural version 2.2 and above supported
• Missing source
— Source recovery not possible
— Previous options not available anymore
• Catalog with latest version recommended
• PGP profile parameter
• Can replace SET CONTROL 'P=x'
• CCHAR
• Controls x’01’-x’3F’ translation
• Internal CSTATIC list
• RCA not possible
• Rename custom module
• REPLACE link option
June 26, 2012 | 21
Miscellaneous Changes
• Profile parameters
• Input for NATPARM logged
• USR8203N to display values
• Example
1 NTPRM
2 NTDS
etc.
15 NTVSAM
ADANAME=ADABAS,NUCNAME=NAT822SH,ETID=' ',SUBSID=P822,PC=ON,
PD=50,ESIZE=222,DB2SIZE=24,VSIZE=0,ULANG=1,FNR=1822,
ADAMODE=2,DBCLOSE=ON,ET=OFF,AUTO=ON,RECAT=OFF,RI=OFF,
CSTATIC=(CMMSG,NSPPFUNC),CDYNAM=10,DELETE=OFF,CP=ON,LS=250,
PS=80,MADIO=0,DBROLL=128,MAXCL=0,LE=OFF,DSC=ON,ENDMSG=OFF,
ATTN=ON,ZD=ON,CF='%',DFOUT=S,DFSTACK=S
ASIZE,64
BTSUPP=ON,CLSUPP=ON,DDMCHK=OFF,DFBE=10,DFBN=50,ENADIS=OFF,
ENAUNE=OFF,ETSUPP=ON,FORMAT=ON,OPSUPP=OFF,PATH=OFF,
SFILE=OFF,DDSWITE=0
etc.
• Enhancement proposals
• http://brainstorm.softwareag.com
June 26, 2012 | 22
New LIST option COMPOUT
• Compiler output
•
•
•
•
Used, unused variables
External subroutines
Statement categories
NOC analysis
• Object must be cataloged
• Output options
• Screen
• Work file
• Text member
June 26, 2012 | 23
LIST COMPOUT Main Menu
12:58:01
***** NATURAL LIST COMMAND *****
User DBA
- LIST Compiler Output -
Cataloged object name .. ________
Select the desired options:
_ Display unused variables
_ Display used variables
_ Display contained external subroutines
_ Display used external subroutines
_ Display code profile
_ Display statement categories
_ Display statement type
Select the output destination:
X Screen
_ Work file 1
_ Natural text REPCPOUT in library SYSTEM__
2012-05-08
Library SYSTEM
June 26, 2012 | 24
LIST COMPOUT Example
DEFINE DATA
LOCAL USING COMPLDA /* Defines #A, #B, #C
LOCAL
1 #D (A10)
1 #E (A5)
1 #F (N2)
1 EMP VIEW OF EMPLOYEES
2 NAME
2 BIRTH
END-DEFINE
#A := 'AAA'
#D := 'DDD'
DISPLAY #A #B #D #E NAME
END
June 26, 2012 | 25
COMPOUT – Used and Unused Variables
Variable Usage
L
Variable Name
Format/Length
Type Usage
-- -------------------------------- -------------------- ---- ---------Variables defined in external LDA COMPLDA:
1
#A
(A10)
LDA Modified
1
#B
(A5)
LDA Referenced
1
#C
(N2.0)
LDA Unused
Variables defined internally:
1
#D
(A10)
Inl Modified
1
#E
(A5)
Inl Referenced
1
#F
(N2.0)
Inl Unused
1
EMP
2
NAME
(A20)
Inl Referenced
2
BIRTH
(D)
Inl Unused
Inl Unused
June 26, 2012 | 26
LIST COMPOUT <name> STATP without NOC
• Displays code profile
• Contiguous sequences of
statements grouped by
categories
• Suitable for optimization
Code Profile
Line
Statement
----
--------------------------------------
0000
ON ERROR
0000
MCG OPTIONS
0000
NOOP
<-- NOCable
0045
MOVE/COMPUTE/ASSIGN
<-- NOCable
0045
MOVE/COMPUTE/ASSIGN
<-- NOCable
0365
SET CONTROL
0370
SET KEY
0390
BLOCK START
0390
SET WINDOW
0415
BLOCK START
0415
SET WINDOW
0445
MOVE/COMPUTE/ASSIGN
<-- NOCable
0455
REPEAT
<-- NOCable
0465
SET KEY
0475
MOVE/COMPUTE/ASSIGN
<-- NOCable
June 26, 2012 | 27
LIST COMPOUT <name> STATP with NOC
• Displays code profile
• Contiguous sequences of
statements grouped by
categories
• NOC coding generated for an
optimized program
Code Profile
Line
Statement
----
--------------------------------------
0000
ON ERROR
0000
MCG OPTIONS
0040
MCG OPTIONS
0000
OPTIONS
0045
NOC CODE
0045
NOC CODE
0365
SET CONTROL
0370
SET KEY
0390
SET WINDOW
0415
SET WINDOW
0445
NOC CODE
0455
NOC CODE
0465
SET KEY
0475
NOC CODE
0475
NOC CODE
June 26, 2012 | 28
LIST COMPOUT <name> STATC without NOC
• Displays statement categories
• Categories of statements with
the corresponding number of
occurrences
Statement Categories
Statement Category
No NOC
NOCable
------------------------- -------
-------
Database Loop ...........
0
0
Database Simple .........
0
0
SORT / WORK I/O .........
0
0
FOR / REPEAT ............
0
27
Screen / Printer ........
10
0
String Manipulation .....
52
12
Arith / Logical .........
0
286
Program Calls ...........
1
0
Control Transfer ........
46
69
Block Start .............
11
0
Set Environment .........
35
0
System Functions ........
0
0
Miscellaneous ...........
0
0
Total Statements ........
551
NOC optimizable .........
394
Ratio (%) ...............
71
Longest NOC Run .........
25
June 26, 2012 | 29
LIST COMPOUT <name> STATC with NOC
• Displays statement categories
• Categories of statements with
the corresponding number of
occurrences
Statement Categories
Statement Category
Number
------------------------- ------Database Loop ...........
0
Database Simple .........
0
SORT / WORK I/O .........
0
FOR / REPEAT ............
0
Screen / Printer ........
9
String Manipulation .....
50
Arith / Logical .........
0
Program Calls ...........
1
Control Transfer ........
37
Block Start .............
10
Set Environment .........
35
System Functions ........
0
Miscellaneous ...........
0
Total Statements ........
499
NOC optimized ...........
334
Ratio (%) ...............
66
Longest NOC Run .........
13
June 26, 2012 | 30
LIST COMPOUT <name> STATT without NOC
• Displays statement type
• Lists single statements with the
corresponding number of
occurrences
Statement Type
Statement
No NOC
NOCable
------------------------- -------
-------
MOVE/COMPUTE/ASSIGN .....
0
153
EXAMINE .................
29
0
COMPRESS ................
0
12
CALLNAT/PERFORM EXTERNAL
1
0
SET WINDOW ..............
6
0
MOVE SUBSTR .............
23
0
XML .....................
2
0
INPUT ...................
5
0
REINPUT .................
3
0
ELSE/CLOSE LOOP .........
0
22
LOOPEND FOR/REPEAT ......
0
25
BLOCK START .............
10
0
ON ERROR ................
1
0
END .....................
1
0
RETURN INLINE ...........
10
0
etc..
June 26, 2012 | 31
LIST COMPOUT <name> STATT with NOC
• Displays statement type
• Lists single statements with the
corresponding number of
occurrences
Statement Type
Statement
Number
------------------------- ------EXAMINE .................
28
COMPRESS ................
0
CALLNAT/PERFORM EXTERNAL
1
SET WINDOW ..............
6
MOVE SUBSTR .............
22
XML .....................
2
INPUT ...................
4
REINPUT .................
3
NOC CODE ................
332
BLOCK START .............
9
ON ERROR ................
1
END .....................
1
RETURN INLINE ...........
3
ESCAPE TOP ..............
0
ESCAPE BOTTOM ...........
0
etc..
June 26, 2012 | 32
SYSRDC
Changes, Overview and Uses
June 26, 2012 | 33
SYSRDC
• What
• Captures Natural runtime events
• When
• Program execution
• Where
• Internal buffer
• Exit program
• Why
• Accounting or Monitoring interface
• Trace tool for debugging
June 26, 2012 | 34
SYSRDC Events
SI/ST
Session Initialization/Termination
PL
Program Load
PS/PT
Program Start/Termination
DB/DA
Before/After Database call
IB/IA
Before/After Terminal I/O
CB/CA
Before/After non-Natural program call
E
Runtime Error
N
Internal Trace
NS
Natural Statement
RS
Start of RPC request execution
RI/RO
Inbound/Outbound RPC message
U
User-defined event
June 26, 2012 | 35
Data captured by the Events
• Global data
• Common to all events
• Local data
Global Data
• Specific to event
• Layout of data
• Local data area RDCDATA in SYSRDC
— Event = GTYPE + LTYPE
• Macro NAMRDC in NATxxx.SRCE
— Event = RDCGTYPE + RDCLTYPE
Local Data
June 26, 2012 | 36
Internal Buffer vs. Exit Program
Internal buffer
Exit program
•Ad hoc debugging or tracing
•Accounting
•Typically online
•Monitoring
•Size > 2
•Wrap around buffer
•Display data
• SYSRDC or PROFILER utility
— Omegamon, TMON
— Trends
— Module usage
•SIZE=2,EXIT=MYEXIT
•All events passed to exit
•Session termination capture
•Display data - sample programs
• XNATRDC1 – batch
• XNCIRDC1 – CICS
• XNCFRDC1 – Com-plete
June 26, 2012 | 37
Enable and Disable SYSRDC
• Enable
• Internal buffer - size > 2
— RDC=(SIZE=nn)
— NTRDC SIZE=nn
• Exit program – size=2
— RDC=(SIZE=2,EXIT=(MYEXIT))
— NTRDC SIZE=2,EXIT=(MYEXIT,400,RDCEX9)
• RDCSIZE >= 2
• SIZE > 2 and EXIT
— Tracing to internal buffer and exit program
• Disable
• RDC=(SIZE=0)
• NTRDC SIZE=0
• RDCSIZE=0
June 26, 2012 | 38
Start and Stop Tracing
• Start tracing
•
•
•
•
•
•
RDC=(ON,SIZE=80,FNAT=ON,EVENT=ALL)
NTRDC ON,SIZE=80,FNAT=OFF,EVENT=(S,P,DA)
System command RDC ON - easiest
Terminal command %<RDC+
Natural statement CALL 'CMRDC' 'S‘
PROFILER T toggle or RDCSTART in SYSRDC
• Stop Tracing
•
•
•
•
•
•
RDC=OFF or NTRDC OFF
System command RDC OFF
Terminal command %<RDCNatural statement CALL 'CMRDC' ‘P‘
PROFILER T toggle or RDCSTOP in SYSRDC
Displaying RDC data stops tracing
June 26, 2012 | 39
Event tracing
• EVENT=ALL is the default
• Examples
• RDC=(EVENT=P) or NTRDC EVENT=P
— Trace events PL, PS, PT
• RDC=(EVENT=PS,PT) or NTRDC EVENT=PS,PT
— Trace events PS, PT
• Special events
• Internal trace
— Event N
— ITRACE =ON,TRACE=xxxxxxxx
— Modules to trace supplied by Natural development
• Natural statement trace
— Event NS
— ITRACE=ON,TRACE=NATPROX
Session initialization
Program load
Program start
Before database call
After database call
Before terminal I/O
After terminal I/O
Program end
Session termination
June 26, 2012 | 40
Exit Program Sample Programs
•
Batch and TSO
• XNATRDC1 in NATxxx.SRCE
— Writes to SYSPRINT
• COBOL example
— Technical paper Using the SYSRDC utility
•
Com-plete
• XNCFRDC1 in NATxxx.SRCE
— Creates SMF records
•
CICS
• XNCIRDC1 in NCIxxx.SRCE
— Creates CICS trace entries
SYSPRINT
SMF
CICS TRACE
June 26, 2012 | 41
SYSRDC Event Data Display
• SYSRDC library
• MENU or RDCDISP
• New module RDCDISIO
— Debug NAT1132 errors
— ITRACE=ON,RDCSIZE=128,TRACE=IO
• RDCSET, RDCSTART, RDCSTOP
• Logon to SYSRDC needed
— or copy modules to steplib
• New PROFILER utility
• Invoke from any library
• Overview of trace records
• Detail of trace records
• Exit program output
• Custom code
June 26, 2012 | 42
SYSRDC MENU/RDCDISP Output
ETIME1
TY
GCUID
LV
GPGM
T
GCAPL
PRLIB
PRNAM
CO
DB
FN
RC
------- -- -------- -- -------- - -------- -------- -------- -- ----- ----- ---
0.0000 PL DBA
SYSTEM
SYSTEM
EMP
SYSTEM
EMP
0.0000 PS DBA
1 EMP
F SYSTEM
232
1820
0.0001 DB DBA
1 EMP
SYSTEM
L3
232
316
0.0656 DA DBA
1 EMP
SYSTEM
L3
232
316
0.0070 DB DBA
1 EMP
SYSTEM
L3
232
316
0.0061 DA DBA
1 EMP
SYSTEM
L3
232
316
0.0000 DB DBA
1 EMP
SYSTEM
L3
232
316
0.0158 DA DBA
1 EMP
SYSTEM
L3
232
316
0.0000 DB DBA
1 EMP
SYSTEM
RC
232
0.0002 DA DBA
1 EMP
SYSTEM
RC
232
0.0000 PT DBA
1 EMP
F SYSTEM
SYSTEM
EMP
0.0001 DB DBA
SYSTEM
RC
232
0.0001 DA DBA
SYSTEM
RC
232
0.0002 IB DBA
SYSTEM
1195304
131698
265
0.8183 IA SAPIE
SYSTEM
1195304
125816
265
3
June 26, 2012 | 43
PROFILER Utility
15:31:14
***** NATURAL PROFILER UTILITY *****
User DBA
- Main Menu -
2012-05-02
19 records
Trace stopped
Code
Function
S
Select profiler events
L
List trace records
D
Display trace record
T
Start/Stop profiler tracing
P
Print trace records
W
Download trace records
?
Help
.
Exit
Code .. _
Record from .. 1_____
to .. 19____
June 26, 2012 | 44
PROFILER Utility
14:57:58
***** NATURAL PROFILER UTILITY *****
User DBA
- Select Profiler Events -
2012-05-02
19 records
Trace stopped
Collect Display Type Profiler Event
------- ------- ---- ---------------------------X
X
PL
Program load
X
X
PS
Program start
X
X
PT
Program termination
X
X
DB
Before database call
X
X
DA
After database call
X
X
IB
Before terminal I/O
X
X
IA
After terminal I/O
X
X
CB
Before external program call
X
X
CA
After external program call
X
X
E
Runtime error
_
_
NS
Natural statement
X
X
U
User-defined event
June 26, 2012 | 45
PROFILER Utility
11:40:04
***** NATURAL PROFILER UTILITY *****
User DBA
2012-05-04
- List Trace Records View:
21 records
G P D I C E - U
General Information
C Record Ev Library
Lvl Program
Line Time
Elapsed Time
- ______ __ -------- --- -------- ---- --------------- -------------X _ 000001 DB SYSTEM
11:36:40.252429
n/a
_ 000002 DA SYSTEM
11:36:40.253446
0.001017
_ 000003 PL SYSTEM
11:36:40.253466
0.000020
_ 000004 PS SYSTEM
1 EMP
0000 11:36:40.253486
0.000020
_ 000005 DB SYSTEM
1 EMP
0060 11:36:40.253549
0.000063
_ 000006 DA SYSTEM
1 EMP
0060 11:36:40.253726
0.000177
_ 000007 DB SYSTEM
1 EMP
0060 11:36:40.253807
0.000081
_ 000008 DA SYSTEM
1 EMP
0060 11:36:40.253903
0.000096
_ 000009 DB SYSTEM
1 EMP
0060 11:36:40.253914
0.000011
_ 000010 DA SYSTEM
1 EMP
0060 11:36:40.253979
0.000065
_ 000011 DB SYSTEM
1 EMP
0060 11:36:40.253990
0.000011
_ 000012 DA SYSTEM
1 EMP
0060 11:36:40.254055
0.000065
June 26, 2012 | 46
PROFILER Utility
09:03:53
***** NATURAL PROFILER UTILITY *****
User DBA
2012-05-03
- List Trace Records View:
23 records
G P D I C E - U
General Information
C Record Ev Library
Lvl Program
Line Time
Elapsed Time
- ______ __ -------- --- -------- ---- --------------- -------------X _ 000
|------------------ - Line Commands - ---------------------------|
_ 000
|
|
_ 000
| 'D'
: Display all information of trace record.
|
_ 000
| 'X'
: Mark trace record with 'X' (field 'Record From').
|
? 000
| 'Y'
: Mark trace record with 'Y' (field 'Record To').
|
_ 000
|
_ 000
|----------------------------------------------------------------|
|
_ 000
_ 000009 DB SYSTEM
1 EMP
0060 09:03:24.857147
0.000109
Y _ 000010 DA SYSTEM
1 EMP
0060 09:03:24.857758
0.000611
_ 000011 DB SYSTEM
1 EMP
0060 09:03:24.857798
0.000040
_ 000012 DA SYSTEM
1 EMP
0060 09:03:24.858491
0.000693
June 26, 2012 | 47
PROFILER Utility – PF11
11:41:36
***** NATURAL PROFILER UTILITY *****
User DBA
- List Trace Records View:
2012-05-04
21 records
G P D I C E - U
PL/PS/PT - Program Load/Start/Termination
C Record Ev Library
Program
Type DBID
FNR
- ______ __ -------- -------- ---- ----- ----X _ 000001 DB
_ 000002 DA
_ 000003 PL SYSTEM
EMP
_ 000004 PS SYSTEM
EMP
P
232
1820
_ 000005 DB
_ 000006 DA
_ 000007 DB
_ 000008 DA
_ 000009 DB
_ 000010 DA
Use PF10/PF11 to show event-specific data of the trace records.
June 26, 2012 | 48
PROFILER Utility - PF11
11:42:13
***** NATURAL PROFILER UTILITY *****
User DBA
2012-05-04
- List Trace Records View:
21 records
G P D I C E - U
DB/DA - Before/After Database Call
C Record Ev DBID
FNR
DB Type Cmd
Cmd ID
Response Subcode
- ______ __ ----- ----- ------- ---- -------- -------- ------X _ 000001 DB
232
1820
8
S1
00000000
_ 000002 DA
232
1820
8
S1
00000000
_ 000005 DB
232
316
8
L3
00600101
_ 000006 DA
232
316
8
L3
00600101
_ 000007 DB
232
316
8
L3
00600101
_ 000008 DA
232
316
8
L3
00600101
_ 000009 DB
232
316
8
L3
00600101
_ 000010 DA
232
316
8
L3
00600101
0
0
0
28
0
28
0
28
_ 000003 PL
_ 000004 PS
Use PF10/PF11 to show event-specific data of the trace records.
June 26, 2012 | 49
PROFILER Utility – PF11
11:44:32
***** NATURAL PROFILER UTILITY *****
User DBA
- List Trace Records View:
2012-05-04
21 records
G P D I C E - U
IB/IA - Before/After Terminal I/O
C Record Ev Total Storage Compr. Storage Bytes In Bytes Out
- ______ __ ------------- -------------- -------- --------_ 000014 DA
_ 000015 DB
_ 000016 DA
_ 000017 PT
_ 000018 DB
_ 000019 DA
_ 000020 IB
1129776
131618
0
265
Y _ 000021 IA
1129776
125972
3
265
Use PF10/PF11 to show event-specific data of the trace records.
June 26, 2012 | 50
PROFILER Utility – PF11
11:51:47
***** NATURAL PROFILER UTILITY *****
User DBA
- List Trace Records View:
2012-05-04
19 records
G P D I C E - U
CB/CA - Before/After External Program Call
C Record Ev Program
Response Mode
Location Call by
- ______ __ -------- -------- ------- -------- --------_ 000014 PS
_ 000015 CB LOOKLE
Dynamic
Reference
_ 000016 CA LOOKLE
0 Dynamic
Reference
_ 000017 PT
_ 000018 IB
Y _ 000019 IA
Use PF10/PF11 to show event-specific data of the trace records.
June 26, 2012 | 51
PROFILER Utility – PF11
11:47:33
***** NATURAL PROFILER UTILITY *****
User DBA
- List Trace Records View:
G P D I C E - U
E - Runtime Error
C Record Ev Program
Line Error Abend Error-TA
- ______ __ -------- ---- ----- ----- --------X _ 000001 DB
_ 000002 DA
_ 000003 DB
_ 000004 DA
_ 000005 DB
_ 000006 DA
_ 000007 PL
_ 000008 E
TEST
0010
82
_ 000009 DB
Y _ 000010 DA
Use PF10/PF11 to show event-specific data of the trace records.
2012-05-04
10 records
June 26, 2012 | 52
PROFILER Utility – PF11
11:56:26
***** NATURAL PROFILER UTILITY *****
User DBA
- List Trace Records View:
2012-05-04
10 records
G P D I C E - U
U - User-Defined Event
C Record Ev User Data
- ______ __ ----------------------------------------------------------------X _ 000001 DB
_ 000002 DA
_ 000003 DB
_ 000004 DA
_ 000005 PL
_ 000006 PS
_ 000007 CB
_ 000008 U TEST MESSAGE
_ 000009 CA
Y _ 000010 PT
Use PF10/PF11 to show event-specific data of the trace records.
June 26, 2012 | 53
PROFILER Utility - Detail
15:10:39
***** NATURAL PROFILER UTILITY *****
2012-05-02
User DBA
- Display Trace Record -
19 records
Record / Event .... 2_____
/
PS - Program start
Event time ........ 15:02:47.878623
Elapsed time ....... 0.000012
CPU time .......... 0
Current user ID ... DBA
Current group ID ...
Current program ... EMP
Library ............ SYSTEM
Program level ..... 1
Program line ....... 0000
Program type ...... Program
Library ........... SYSTEM
DBID .............. 232
FNR ............... 1820
Enter required record number, or use PF6 - PF9 for paging.
June 26, 2012 | 54
PROFILER Utility - Detail
15:12:38
***** NATURAL PROFILER UTILITY *****
2012-05-02
User DBA
- Display Trace Record -
19 records
Record / Event .... 3_____
/
DB - Before database call
Event time ........ 15:02:47.878675
Elapsed time ....... 0.000052
CPU time .......... 0
Current user ID ... DBA
Current group ID ...
Current program ... EMP
Library ............ SYSTEM
Program level ..... 1
Program line ....... 0060
Database type ..... Adabas V8
DBID .............. 232
FNR ............... 316
Command code ...... L3
Command ID ........ 00600101
Enter required record number, or use PF6 - PF9 for paging.
June 26, 2012 | 55
Sample exit XNATRDC1 SYSPRINT Output
NATURAL DATA COLLECTOR
ETIME
TY
GCUID
12/125
LV
GPGM
T GLIN
GCAPL
PRLIB
15:39:29
PRNAM
PAGE
CO
1
DB
FN
RC
----------- -- -------- -- -------- - ---- -------- -------- -------- -- ----- ----- --0.0001 SI DBA
SYSTEM
0.7461 DB DBA
SYSTEM
0.0005 DA DBA
SYSTEM
0.0000 DB DBA
SYSTEM
0.0687 DA DBA
SYSTEM
0.0117 DB DBA
SYSTEM
0.0337 DA DBA
SYSTEM
0.0001 DB DBA
SYSTEM
0.0013 DA DBA
SYSTEM
0.0000 DB DBA
SYSTEM
0.0001 DA DBA
SYSTEM
0.0001 PL DBA
SYSTEM
SYSLIB
SYSLIB
OP
232
S1
232
1822
S1
232
1822
L3
232
1822
RC
232
LOGON
0.0001 PS DBA
1 LOGON
F 0000 SYSTEM
232
0.0017 CB DBA
1 LOGON
3570 SYSTEM
CMUB
0.0000 CA DBA
1 LOGON
3570 SYSTEM
CMUB
1822
S
000
June 26, 2012 | 56
Sample exit XNCIRDC1 Output
• Extract trace details for id 120(x’78’)
• EXEC PGM=DFHTUxxx,PARM='TYPETR=(AP0078)'
AP 0078 USER 120
REQ(0002) FIELD-A(E2E8E2E3 SYST) FIELD-B(C5D44040 EM
) RESOURCE($NONAME$)
AP 0078 USER 120
REQ(0002) FIELD-A(E2E8E2E3 SYST) FIELD-B(C5D44040 EM
) RESOURCE(LOGON
AP 0078 USER 120
REQ(0002) FIELD-A(E2E8E2E3 SYST) FIELD-B(C5D44040 EM
) RESOURCE(NAT00071)
AP 0078 USER 120
REQ(0002) FIELD-A(E2E8E2E3 SYST) FIELD-B(C5D44040 EM
) RESOURCE(NAT00009)
)
AP 0078 USER 120
REQ(0002) FIELD-A(E2E8E2E3 SYST) FIELD-B(C5D44040 EM
) RESOURCE(LOGON000)
AP 0078 USER 120
REQ(0002) FIELD-A(E2E8E2E3 SYST) FIELD-B(C5D44040 EM
) RESOURCE(NATN1LOG)
AP 0078 USER 120
REQ(0002) FIELD-A(E2E8E2E3 SYST) FIELD-B(C5D44040 EM
) RESOURCE(EMP
)
June 26, 2012 | 57
Usage Examples
• Accounting
• Billable services
• Monitoring
• Program usage
• Unused programs
• Debugging or Tracing
• Error conditions
• Timing
• Performance
June 26, 2012 | 58
Application Tracing
• Call flow
• Who calls who
• Identify Startup programs
• STACK parameter or *STARTUP value
• Error handling
• Error program in ETA or *ERROR-TA
• Identify activated exits
• Exit programs for utilities and sub-products
• Statement trace
• Shows conditional flow
• Module exit point
• Line number on PT event
June 26, 2012 | 59
Database Calls – SYSRDC vs. TEST DBLOG
• Trace shows database access in relation to other events
• TEST DBLOG
• Database calls to Natural system files
— LOG=ON
• Adabas buffer contents can be logged
— Limit on buffer size
• SYSRDC
• Database calls to Natural system files
— FNAT=ON
• High level detail
• Addresses of all buffers available
— Implement custom database buffer logging in exit program
0101010010
1010101000
0010100100
0010001001
0101010100
June 26, 2012 | 60
STEPLIB debugging
• Program Load event
LIBRARY1
• Bufferpool check
• DB/DA events before PL and PS events
• Indicates search sequence
LIBRARY2
LIBRARY3
LIBRARY4
LIBRARY5
• PS and PT events
• Library indicates location of executing module
• DBID/FNR indicates system file
LIBRARY6
LIBRARY7
LIBRARY8
• Example
ETIME1
TY
GCUID
LV
GPGM
T
GCAPL
PRLIB
PRNAM
CO
DB
FN
RC
------- -- -------- -- -------- - -------- -------- -------- -- ----- ----- --0.0000 PS DBA
1 EMP
F APPLIB
SYSTEM
EMP
0.0000 PT DBA
1 EMP
F APPLIB
SYSTEM
EMP
232
1820
June 26, 2012 | 61
Database Access
• DBID/FNR resolution for file access
1
• Natural perspective
—
—
—
—
DDM
UDB
FUSER
NTTF
25
95
• Adabas perspective
— Adabas link routine
— Adabas user exit
• Example
M
Time/Duration Ty Lev Program
T Line Library
*LIBRARY Co
Dbid
Fnr Resp
_
22:13:28.7195 DB
1 READ-EMP
0010
NATRDC
L2
232
21
_
0.1553 DA
1 READ-EMP
0010
NATRDC
L2
232
21
June 26, 2012 | 62
User Trace Entries
• Create reference points
• Similar to adding DISPLAY statements
• Contains line number
• Indirect statement trace
• Debugging without a terminal or I/O
• Eliminates I/O interference
• Processed immediately
• Compared to DISPLAY/WRITE/PRINT
• CALL ‘CMRDC’ ‘U’ text
• Example
COMPRESS ‘ #N =' #N INTO #TRACE
CALL 'CMRDC' 'U' #TRACE
June 26, 2012 | 63
Timing an Application
• Session duration
• Session start (SI) and Session termination (ST) time
• Module timing
• Program start (PS) and Program termination (PT) time
• Statement timing…
• Most statements < 0.0001 seconds
• Timing of groups of statements
• Add user defined (U) events and compare times
• Example
Record Ev Library
Lvl Program
Line Time
Elapsed Time
______ __ -------- --- -------- ---- --------------- -------------000001 PS SYSTEM
1 EMP
0000 15:45:42.592863
n/a
000002 PT SYSTEM
1 EMP
0090 15:45:42.594271
0.001408
June 26, 2012 | 64
Questions?
Contact Information here