+ All Categories
Home > Documents > Debugging Natural Applications

Debugging Natural Applications

Date post: 27-Nov-2014
Category:
Upload: txoriabeltza4764
View: 177 times
Download: 0 times
Share this document with a friend
53
Debugging Natural Debugging Natural applications applications
Transcript
Page 1: Debugging Natural Applications

Debugging NaturalDebugging Naturalapplicationsapplications

Page 2: Debugging Natural Applications

Debugging NaturalDebugging Naturalapplications.applications.

What is “Debugging”?What is “Debugging”?

• Finding logic errorsFinding logic errors

• Resolving data anomaliesResolving data anomaliesParameter conflictsParameter conflictsNo-record-foundNo-record-found conditions

• Testing; Quality AssuranceTesting; Quality Assurance• Navigation errors ( “how did it get here?”)Navigation errors ( “how did it get here?”)

• Discovering reason for response code or abend.Discovering reason for response code or abend.

• Locating performance problemLocating performance problem

Page 3: Debugging Natural Applications

Debugging Debugging Initial questionsInitial questions

For a production application, first question is…For a production application, first question is… WHAT CHANGED?WHAT CHANGED?

– Application (code) changesApplication (code) changes– System (environmental) changesSystem (environmental) changes

Software upgradesSoftware upgrades Parameter settingsParameter settings Authorizations/security changesAuthorizations/security changes

– Data/Dataset changes (SMS changes)Data/Dataset changes (SMS changes)

Check Lifecycle software history/logsCheck Lifecycle software history/logs Always document changes in source listings.Always document changes in source listings.

Page 4: Debugging Natural Applications

DebuggingDebuggingChoosing toolsChoosing tools

So, “Nothing changed”… now how do I So, “Nothing changed”… now how do I choose the best debugging tools?choose the best debugging tools?

Is the program still active or [ab]ended?Is the program still active or [ab]ended? Is it batch or online or client/server?Is it batch or online or client/server?

Is it a reproducible or random problem?Is it a reproducible or random problem?Are there any Non-Natural elements involved?Are there any Non-Natural elements involved?How long does it run before it blows up?How long does it run before it blows up?

Do all users experience this problem?Do all users experience this problem?Can application be disabled, or is it required now?Can application be disabled, or is it required now?

Page 5: Debugging Natural Applications

DebuggingDebuggingInitial QuestionsInitial Questions

• If Completed:If Completed: Abended?Abended? Incomplete or Incorrect results?Incomplete or Incorrect results? Timed out? (see “stalled” below)?Timed out? (see “stalled” below)?

•If still active:If still active: Looping and burning up CPU now?Looping and burning up CPU now?

Hammering the database?Hammering the database? Stalled, doing nothing. Stalled, doing nothing.

During SMS backups or DB maintenance?During SMS backups or DB maintenance?During competing application execution?During competing application execution?Check console log for Check console log for

peer applications/jobs?peer applications/jobs?Resource Enqueue?Resource Enqueue?

ECB posted?ECB posted?

Page 6: Debugging Natural Applications

DebuggingDebuggingChoosing toolsChoosing tools

RDC exit

SYSRDC

CEDF

TEST [dblog]

DUMP (and analysis)

Omegamon/sysview

Insight/Review

%<TEST

Slip traps

RDC exit

Write/Display CMPRT/ WK (EDT,TSQ) CMWTO SYSRDCCMEDFUSRxxxxxx Terminal Cntl.Fetch Return (BUS)Send e-mail

ScreenData storePC/Workstation

Disk Reports

Page 7: Debugging Natural Applications

Debugging Debugging Collecting cluesCollecting clues

Collecting initial cluesCollecting initial clues– Look for Natural error messages.Look for Natural error messages.– System Messages output. (batch & online).System Messages output. (batch & online).– Read Console log messages (errors, enques).Read Console log messages (errors, enques).

05276 08:48:54.66 STC08521 00000090 IEF450I EXRPCSV1 05276 08:48:54.66 STC08521 00000090 IEF450I EXRPCSV1 NATEX - ABEND=S222 U0000 REASON=00000000NATEX - ABEND=S222 U0000 REASON=00000000

– Natural [RPC] Server logs and its messages.Natural [RPC] Server logs and its messages. //TRACE1 DD SYSOUT=*,LRECL=133,RECFM=FBA//TRACE1 DD SYSOUT=*,LRECL=133,RECFM=FBA

– TP monitor messages.TP monitor messages. 10/04/2005 08:47:18 WTRMCICS T012 CSNE Node 10/04/2005 08:47:18 WTRMCICS T012 CSNE Node

Unrecoverable. VTAM LOSTERM Error Code X'14'. Unrecoverable. VTAM LOSTERM Error Code X'14'.

Page 8: Debugging Natural Applications

Starting the investigationStarting the investigation– Make sure you are where you think you are.Make sure you are where you think you are.

PGM is in Natural, in LE, in an address space, in LPAR.. Op-sysPGM is in Natural, in LE, in an address space, in LPAR.. Op-sys

– Avoid assumptionsAvoid assumptions Which version of module was executing?Which version of module was executing?

– Use INFO, or L DIR, compare against BP info.Use INFO, or L DIR, compare against BP info. Which input datasets were used?Which input datasets were used? Environment parameter settings.Environment parameter settings.

– USR1005P (Shows Nat. session parms. See Lib SYSEXT)USR1005P (Shows Nat. session parms. See Lib SYSEXT)– GETUPARM (lShows dynam parms. See Lib SYSEXTP)GETUPARM (lShows dynam parms. See Lib SYSEXTP)– //CMPRMIN or EXEC (may have override parms specified)//CMPRMIN or EXEC (may have override parms specified)

Response code checking (or lack of) in Non-Natural.Response code checking (or lack of) in Non-Natural.

DebuggingDebuggingCollecting cluesCollecting clues

Page 9: Debugging Natural Applications

Debugging.Debugging.Monitoring ToolsMonitoring Tools

TEST The facilityTEST The facility SYSRDCSYSRDC SYSTPSYSTP

– SYSMON (performance statistics)SYSMON (performance statistics) Additional non-invasive toolsAdditional non-invasive tools

– DUMPDUMP– TECH TECH – LASTMSG (if error handler lost last error).LASTMSG (if error handler lost last error).– List Xref (where is that variable modified?).List Xref (where is that variable modified?).

SMH (SAG’s system management hub).SMH (SAG’s system management hub). Omegamon or Sysview type tools.Omegamon or Sysview type tools. Insight/Review for ADABAS monitoring.Insight/Review for ADABAS monitoring.

Page 10: Debugging Natural Applications

DebuggingDebugging

Page 11: Debugging Natural Applications

DebuggingDebuggingAltered source tools Altered source tools

Nucleus Entry pointsNucleus Entry points– CALL CMWTO & CMWTL (write to oper, write CALL CMWTO & CMWTL (write to oper, write

to log). Available online or batch.to log). Available online or batch.– CMEDF (see CICS specific debugging tips)CMEDF (see CICS specific debugging tips)

FETCH RETURN FETCH RETURN – To BUS, TECH, or other Natural facilities for To BUS, TECH, or other Natural facilities for

point-in-time statistics.point-in-time statistics.

Page 12: Debugging Natural Applications

DebuggingDebuggingAltered sourceAltered source

Write/Display/PrintWrite/Display/Print– Send output to another terminal session)Send output to another terminal session)

DEFINE PRINTER (1) OUTPUT `DEFINE PRINTER (1) OUTPUT `TID100TID100`̀ OR…OR…

Session 1

Write (1) ‘Testing’

Session 2

Testing

DEFINE DATA LOCAL 1 MSG (A79) INIT <'........THIS IS A TEST MESSAGE FOR MY TERMINAL'>END-DEFINE IF *TPSYS = 'TSO' OR = 'CMS' MOVE ALL *INIT-USER TO MSG UNTIL 8 /* SEND TO A USER ID ELSE MOVE ALL *INIT-ID TO MSG UNTIL 8 /* SEND TO A TERMINAL ID DEFINE PRINTER (X=6) OUTPUT 'MESSAGE' WRITE (X) NOTITLE MSG

Page 13: Debugging Natural Applications

DebuggingDebuggingAltered sourceAltered source

Write/Display/PrintWrite/Display/Print– Terminal control (info line, editor)Terminal control (info line, editor)

DEFINE PRINTER (1) OUTPUT `INFOLINE`DEFINE PRINTER (1) OUTPUT `INFOLINE` DEFINE PRINTER (1) OUTPUT `SOURCE`DEFINE PRINTER (1) OUTPUT `SOURCE`

Goes to special message line on screen, similar to the REINPUT line.

Goes to the Editor buffer. Appends to the bottom of existing data there.

%X+ : Switches the display of the statistics line/infoline on. %X+ : Switches the display of the statistics line/infoline on. %X- : Switches the display of the statistics line/infoline off.%X- : Switches the display of the statistics line/infoline off.%X : Switches the display between on and off. %X : Switches the display between on and off. %XI+ : Displays the line in infoline mode. %XI+ : Displays the line in infoline mode. %XI- : Displays the line in statistics display mode. %XI- : Displays the line in statistics display mode. %XI : Switches between the two display modes. %XI : Switches between the two display modes.

Page 14: Debugging Natural Applications

Jesspool

PCworkstation

DebuggingDebuggingAltered sourceAltered source

Write/Display/PrintWrite/Display/Print– Work files & Print files (PC via PCC or ESS)Work files & Print files (PC via PCC or ESS)

WORK=(PC),PRINTER=(PC),PC=ONWORK=(PC),PRINTER=(PC),PC=ON PRINTER=((1-2),AM=ESS)PRINTER=((1-2),AM=ESS)

Online sessionRead/write Work

DisplayOnline session

Note:

Writing to a work file that is set to SYSOUT=(B,SMTP), and sending lines with proper data formatting for SMTP will send email messages.

NAF is not needed for this, if you have ESS.

TSO Or COM-PLETE

Page 15: Debugging Natural Applications

DebuggingDebuggingAltered sourceAltered source

NATPAGENATPAGE %I=Capture Current Screen %I=Capture Current Screen %E=Display Screen Captures%E=Display Screen Captures %O=Deactivate Screen Capturing%O=Deactivate Screen Capturing %P=Capture Screen Sequence%P=Capture Screen Sequence %S=Resume Screen Capturing %S=Resume Screen Capturing

SET CONTROL ‘<TEST’ to debug from specific points in SET CONTROL ‘<TEST’ to debug from specific points in application logic. Or you can type %< test at any time.application logic. Or you can type %< test at any time.

Page 16: Debugging Natural Applications

Altered SourceAltered Source

Can use SET CONTROL…Can use SET CONTROL…– (A ) %A Play back a Recording(A ) %A Play back a Recording– (B ) %B De/activate Recording(B ) %B De/activate Recording– (B=) %B Library for Recording(B=) %B Library for Recording– (G ) %G Set Playback Mode(G ) %G Set Playback ModeTo capture user activity and “see” what they did to cause To capture user activity and “see” what they did to cause

the error.the error.

Recording keystrokes and screens is also useful Recording keystrokes and screens is also useful for repetitive testing, and performance stats.for repetitive testing, and performance stats.

Page 17: Debugging Natural Applications
Page 18: Debugging Natural Applications

DebuggingDebugging

Page 19: Debugging Natural Applications

Debugging tipsDebugging tips

Natural Administrators:Natural Administrators:

Use SYSERR to give better descriptions and Use SYSERR to give better descriptions and examples, to help the support staff more quickly examples, to help the support staff more quickly understand the cause of the error. (This may understand the cause of the error. (This may require maintenance with each new INPL).require maintenance with each new INPL).

Or make a detailed document with the common Or make a detailed document with the common errors and the common causes for them (e.g. a errors and the common causes for them (e.g. a webpage). SYSERR does not always explain webpage). SYSERR does not always explain causes well enough.causes well enough.

Page 20: Debugging Natural Applications

Debugging tipsDebugging tips

Copy RDCDISP from library SYSRDC to Copy RDCDISP from library SYSRDC to library SYSTEM on the FNAT in the library SYSTEM on the FNAT in the development environment so that it can be development environment so that it can be used from any library to display the trace log used from any library to display the trace log data.data.

Page 21: Debugging Natural Applications

DebuggingDebugging

Page 22: Debugging Natural Applications

Debugging tipsDebugging tips

Inconsistent (works, fails, works again).Inconsistent (works, fails, works again).– Post Mortem examination.Post Mortem examination.

SYSUDUMPSYSUDUMP

– Set a trap. (SAG’s “TRAP ZAP” or use OS trap)Set a trap. (SAG’s “TRAP ZAP” or use OS trap)– Keep a log; Manually or Insight or RDC, or Keep a log; Manually or Insight or RDC, or

CICS, or other.CICS, or other.– Enhance error handler.Enhance error handler.

Page 23: Debugging Natural Applications

Debugging tipsDebugging tips

%MSGSF=ON : Display system error %MSGSF=ON : Display system error messages in full messages in full (program name, (program name, error line and actual message error line and actual message text).text).

%MSGSF=OFF : Display system error %MSGSF=OFF : Display system error messages in short messages in short form (only the form (only the actual message text). actual message text).

Page 24: Debugging Natural Applications

Debugging tipsDebugging tipsResponse codesResponse codes

USR0610N:USR0610N:

Error routines should get the subcode from Error routines should get the subcode from ADABAS errors. This helps quickly identify ADABAS errors. This helps quickly identify the cause of vague type error codes; for the cause of vague type error codes; for example (generic) 3009 timeouts.example (generic) 3009 timeouts.

Page 25: Debugging Natural Applications

Debugging tipsDebugging tips

MOVE nnnn to *ERROR-NRMOVE nnnn to *ERROR-NR

Causes Natural to act as though the error Causes Natural to act as though the error actually happened.actually happened.

May make it easy to simulate error May make it easy to simulate error conditions and follow the logic flow under conditions and follow the logic flow under controlled circumstances.controlled circumstances.

Page 26: Debugging Natural Applications

Debugging tipsDebugging tips

TEST ONTEST ON– For instances when error reporting may be For instances when error reporting may be

misrepresenting where error actually occurred.misrepresenting where error actually occurred. Incorrect line number or programIncorrect line number or program In error loop conditionIn error loop condition When screen buffer size not sufficient to report it.When screen buffer size not sufficient to report it.

Page 27: Debugging Natural Applications

Debugging tipsDebugging tips

Check vendor web sites for infoCheck vendor web sites for info– IBM references. For example: LOOKAT IBM references. For example: LOOKAT

website:website: http://www03.ibm.com/servers/eserver/zseries/zos/bkserv/lookat/http://www03.ibm.com/servers/eserver/zseries/zos/bkserv/lookat/

– SoftwareAG related sitesSoftwareAG related sites http://listserv.uark.edu/archives/sag-l.htmlhttp://listserv.uark.edu/archives/sag-l.html http://developer.softwareag.com/ets/main/default.htmhttp://developer.softwareag.com/ets/main/default.htm http://www.naturalconference.com/http://www.naturalconference.com/ http://servline24.softwareag.com/SecuredServices/http://servline24.softwareag.com/SecuredServices/

Page 28: Debugging Natural Applications

Debugging tipsDebugging tips

%E=OFF : Switch off any error transaction identified %E=OFF : Switch off any error transaction identified by *ERROR-TA and ON ERROR processing. by *ERROR-TA and ON ERROR processing. Any error will be handled by normal Natural error Any error will be handled by normal Natural error processing.processing.

%E=ON : Switch error transaction and ON ERROR %E=ON : Switch error transaction and ON ERROR processing on again. processing on again.

Use to see original error when “error loop” occurrs. Use to see original error when “error loop” occurrs. Or to see trail of unhandled errors.Or to see trail of unhandled errors.

Page 29: Debugging Natural Applications

Debugging tipsDebugging tips

When reporting error conditions from within When reporting error conditions from within an ON ERROR block.an ON ERROR block.– Use INPUT (AD=O) to force output buffer flush Use INPUT (AD=O) to force output buffer flush

so you can see your message. WRITE or so you can see your message. WRITE or DISPLAY does not always flush from memory DISPLAY does not always flush from memory when an abend releases storage. You may miss when an abend releases storage. You may miss your message(s).your message(s).

Page 30: Debugging Natural Applications

DebuggingDebugging

Page 31: Debugging Natural Applications

DebuggingDebuggingPerformance problemsPerformance problems

Function: Define the mode in which a recording will be re-run. Function: Define the mode in which a recording will be re-run. A recording can be re-run in two modes: A recording can be re-run in two modes: - 'Background mode' re-runs the entire recording invisibly. - 'Background mode' re-runs the entire recording invisibly. All actions of the recording are carried out without anything being All actions of the recording are carried out without anything being displayed. No interrupt is possible. displayed. No interrupt is possible. - 'Film mode' re-runs a recording step by step. - 'Film mode' re-runs a recording step by step. All actions are displayed. ENTER will proceed with the next step. All actions are displayed. ENTER will proceed with the next step. CLEAR key will interrupt the recording. CLEAR key will interrupt the recording. Commands: Commands: %GON : Switch on film mode. %GON : Switch on film mode.

%GOFF : Switch on background mode. %GOFF : Switch on background mode.

%G : Toggle between the two modes. %G : Toggle between the two modes. %A : Play back a Recording %A : Play back a Recording %B : De/activate Recording %B : De/activate Recording %B= : Library for Recording %B= : Library for Recording

I want to be able to copy a customer’s recordings to my session to I want to be able to copy a customer’s recordings to my session to reproduce the errors. reproduce the errors.

Page 32: Debugging Natural Applications

DebuggingDebuggingPerformance ProblemsPerformance Problems

Function: Display the Natural statistics Function: Display the Natural statistics line/infoline. line/infoline.

Note: Window line can be either statistics line Note: Window line can be either statistics line

or infoline. or infoline. DEFINE PRINTER (n) OUTPUT ‘INFOLINE’DEFINE PRINTER (n) OUTPUT ‘INFOLINE’

IO=1976,AIO=1644,L=0,C=0,LS=80,PS=42,PLS=80,PCS=24IO=1976,AIO=1644,L=0,C=0,LS=80,PS=42,PLS=80,PCS=24

,FLD=62,CLS=0,ADA=0,FLD=62,CLS=0,ADA=0

Page 33: Debugging Natural Applications

DebuggingDebuggingPerformance ProblemsPerformance Problems

New System Variable *CPU-TIMENew System Variable *CPU-TIME– Batch or TSO only.Batch or TSO only.

SETTIME & *TIMDSETTIME & *TIMD– Clock time, not CPU time.Clock time, not CPU time.

Infoline (see %XI)Infoline (see %XI) DBLOG or INSIGHT or REVIEWDBLOG or INSIGHT or REVIEW NOCOPT MCGEN to see generated code.NOCOPT MCGEN to see generated code.

Page 34: Debugging Natural Applications

DebuggingDebuggingReading DumpsReading Dumps

Page 35: Debugging Natural Applications

DebuggingDebuggingReading dumpsReading dumps

S0C1 = Instruction Exception (exec data)S0C1 = Instruction Exception (exec data)Sometimes done intentionally by vendor.Sometimes done intentionally by vendor.

S0C2 = Privileged instruction (not APF)S0C2 = Privileged instruction (not APF)System level command attempt w/o auth.System level command attempt w/o auth.

S0C3 = Execute Exception (asm EX failed)S0C3 = Execute Exception (asm EX failed)Rare. May be intentional by vendor.Rare. May be intentional by vendor.

S0C4 = Address Exception (protected)S0C4 = Address Exception (protected)Common. Storage corrupted, RSA lost, etc.Common. Storage corrupted, RSA lost, etc.

S0C6 = Spec. Exception (bndry, reg pair)S0C6 = Spec. Exception (bndry, reg pair)Rare. Storage corrupted, etc.Rare. Storage corrupted, etc.

S0C7 = Data exception (non numeric)S0C7 = Data exception (non numeric)Common. Packed/numeric fields have invalid data.Common. Packed/numeric fields have invalid data.

Page 36: Debugging Natural Applications

DebuggingDebuggingDUMPSDUMPS

DUMPs: conventions & conceptsDUMPs: conventions & concepts– PSW = Program Status WordPSW = Program Status Word

Address of executing instruction [at time of error].Address of executing instruction [at time of error].

– R14 = Return address if “performing” a routineR14 = Return address if “performing” a routine– R15 = Address of current module’s entry point, R15 = Address of current module’s entry point,

or return-code when module is done.or return-code when module is done.– R13 = Register Save Area from “upper” module.R13 = Register Save Area from “upper” module.

RSA = STM 14,12,12(13)RSA = STM 14,12,12(13)

Page 37: Debugging Natural Applications

DebuggingDebuggingDown in the dumpsDown in the dumps

TRANSACTION: KSON PROGRAM: UTD223 TASK: 0000145 APPLID: WRGSCICS DISPLAY: 00 STATUS: AN ABEND HAS OCCURRED COMMAREA = '..!...*...;.' = X'0E9B5A040E9B5C048E9B5E04' EIBTIME = 112500 EIBDATE = 0105201 EIBTRNID = 'KSON' EIBTASKN = 145 EIBTRMID = 'S001' EIBCPOSN = 1387 EIBCALEN = 12 EIBAID = X'7D' AT X'001400EA' EIBFN = X'7408' CHANGE AT X'001400EB' EIBRCODE = X'000000460000' AT X'001400ED' EIBDS = '........' + EIBREQID = '........' ABEND : AEY7 ~~~~~~~~~~~~~~~~~~~~~~~~~

Page 38: Debugging Natural Applications

DebuggingDebuggingDown in the dumpsDown in the dumps

ADDRESS: 0E9B5A04 0E9B5A00 000000 0E9B501E 0E9B502A 0E9B5008 ......&...&...&.0E9B5A10 00000C 8E9B48AF 00000000 00000000 00000000 ................

ADDRESS: 0E9B5010 0E9B5010 000000 F0F0F0F0 F0F3C3D3 C5C1D940 4040E2C9 000003CLEAR SI 0E9B5020 000010 C7D5D6D5 40404040 40400000 0000F0F0 GNON ....00 0E9B5030 000020 F0F00040 40404040 40404040 40404040 00.

ADDRESS: 8E9B48AF 8E9B48A0 000000 C4 ...............D 8E9B48B0 000001 D4C4E2C1 C3F1F200 005D4040 40D6D7E3 MDSAC12..) OPT 8E9B48C0 000011 C9D6D5C1 D3404040 40404040 40404040 IONAL 8E9B48D0 000021 40400000 4DF5F0F9 5D40F3F3 F560F3F6 ..(509) 335-36 8E9B48E0 000031 F6F36060 6E404000 00404040 40404040 63--> ..

PF5 shows your working storage where the RSA is the first section.UTD223 DSA: ADDRESS: 001406E8 WORKING STORAGE 001406E0 000000 00000000 0014005C ...............* 001406F0 000008 00000000 8DEC1782 00000000 0014093C .......b........ 00140700 000018 00140750 000CC540 00000000 0E9B501E ...&..E ......&. 00140710 000028 0E9B502A 0E9B5008 8E9B48AF 00000000 ..&...&......... 00140720 000038 001400D0 8DEC1388 0E7C3D00 001406E8 ...}[email protected] 00140730 000048 00000000 00000000 00000000 00140468 ................ 00140740 000058 009BD000 001400D0 0E900EB4 00000000 ..}....}........ 00140750 000068 0DEC1EC7 00000000 00140916 0014091E ...G............ 00140760 000078 00140926 00000000 00140940 00000000 ........... .... 00140770 000088 00000000 00000000 00000000 8014093C ................

IOCB

Page 39: Debugging Natural Applications

DebuggingDebuggingDUMPSDUMPS

DUMP (the Natural command)DUMP (the Natural command)– Helpful OptionsHelpful Options

ABEND (lists basic abend information)ABEND (lists basic abend information) BB+300 (points to session info [user id, prog, line).BB+300 (points to session info [user id, prog, line). IOCB (Input/Output control block)IOCB (Input/Output control block)

– Other sub commandsOther sub commands _ AFB System File Table _ AFB System File Table _ BB User area _ BB User area _ CST Command Stack _ CST Command Stack _ DDR ENTIRE Buffer _ DDR ENTIRE Buffer _ DIR Directories _ DIR Directories _ EPL Entry Points Table_ EPL Entry Points Table _ FUL Editor Work Area _ FUL Editor Work Area _ GAA Graph. Array area _ GAA Graph. Array area _ GDA Graphics Data Area_ GDA Graphics Data Area _ GLC Global Area (Com.)_ GLC Global Area (Com.)

Page 40: Debugging Natural Applications

DebuggingDebuggingReading DumpsReading Dumps

_ GLS Global Area (Sys.) _ GLS Global Area (Sys.) _ IOB I/O Control Block _ IOB I/O Control Block _ KEY PF-Key Table _ KEY PF-Key Table _ PAR Parameter Area _ PAR Parameter Area _ PCB Program CB _ PCB Program CB _ PGF GDDM/PGF Work Area _ PGF GDDM/PGF Work Area _ PRT Printer Table _ PRT Printer Table _ QUT Source Table _ QUT Source Table _ RAS Retain CID Table _ RAS Retain CID Table _ SFB System File Buffer _ SFB System File Buffer _ SRS Subroutine Stack _ SRS Subroutine Stack _ SSB Source Side Buffer_ SSB Source Side Buffer _ WFB Work File Buffer _ WFB Work File Buffer _ SVAR System Variables_ SVAR System Variables

Page 41: Debugging Natural Applications

DebuggingDebuggingReading DumpsReading Dumps

Other Sub commands (continued)Other Sub commands (continued) _ AZAP Driver AZAP Address _ AZAP Driver AZAP Address _ DRV Driver Start Address_ DRV Driver Start Address _ ECSA ECSA Address _ ECSA ECSA Address _ EPT Entry Points Vector _ EPT Entry Points Vector NUC Get Load point of nucleus xxx NUC Get Load point of nucleus xxx _ PARM Active NATPARM _ PARM Active NATPARM PGE Program Entry Point PGE Program Entry Point PGM Program Load Point PGM Program Load Point _ SWAP Swap Pool Address _ SWAP Swap Pool Address

Page 42: Debugging Natural Applications

DebuggingDebuggingReading DumpsReading Dumps

Other Sub commands (continued)Other Sub commands (continued)CICS informationCICS information

_ CSA Common System Area _ CSA Common System Area _ CBX Directory Extension _ CBX Directory Extension _ OPF Optional Features _ OPF Optional Features _ PAM Page Allocation Map _ PAM Page Allocation Map _ PRM NCI Generation Parms_ PRM NCI Generation Parms _ RCB Roll Fac. Cntrl Blk._ RCB Roll Fac. Cntrl Blk. _ SIR Session Info Record _ SIR Session Info Record _ SCB System Directory _ SCB System Directory _ SIT System Init. Table _ SIT System Init. Table _ SRT System Recovery Tab._ SRT System Recovery Tab. _ STR System Trace Table _ STR System Trace Table _ TCB Thread Control Block_ TCB Thread Control Block _ TGD Thread Group Defins._ TGD Thread Group Defins. _ TGH Thread Group Header _ TGH Thread Group Header

Page 43: Debugging Natural Applications

DebuggingDebuggingReading DumpsReading Dumps

CICS information (continued)CICS information (continued) _ THD Thread Load Point _ THD Thread Load Point _ TRH Trace Table Header _ TRH Trace Table Header _ TRT Current Trace Entry _ TRT Current Trace Entry _ TSM Temp. Storage Map _ TSM Temp. Storage Map _ TST Temp. Storage Table _ TST Temp. Storage Table _ COM Communication Area _ COM Communication Area _ DCA Dispatch Cntrl Area _ DCA Dispatch Cntrl Area _ DCT Destination Control _ DCT Destination Control _ DSA Dynamic Storage Area_ DSA Dynamic Storage Area _ EIB Exec Interface Block_ EIB Exec Interface Block _ FCT File Control Table _ FCT File Control Table _ PCT Program Control Tab._ PCT Program Control Tab. _ PLT Program List Table _ PLT Program List Table _ PPT Proc. Program Table _ PPT Proc. Program Table _ TCA Task Control Block _ TCA Task Control Block _ TCT Terminal Control Tab_ TCT Terminal Control Tab _ TWA Transaction Workarea_ TWA Transaction Workarea

Page 44: Debugging Natural Applications

DebuggingDebuggingDumpsDumps

My program to cause an example dump:My program to cause an example dump:

000010 CALL 'CMZUL' 000010 CALL 'CMZUL'

==err> 0010 954 Abnormal termination S0C4 ==err> 0010 954 Abnormal termination S0C4 during program execution. during program execution.

000020 END 000020 END

Page 45: Debugging Natural Applications

DebuggingDebuggingDumpsDumps

14:18:38 ***** NATURAL DUMP COMMAND ***** 2005-07-0514:18:38 ***** NATURAL DUMP COMMAND ***** 2005-07-05User DMDSAC - Abend Information - Page 1 of 1User DMDSAC - Abend Information - Page 1 of 1 Code S0C4 ILC 0006 Code S0C4 ILC 0006 PSW 078D10 00 9585C2F0PSW 078D10 00 9585C2F0 Disp 000014D8 Csect CMZUL Disp 000014D8 Csect CMZUL R0-7 00000000 16117FA6 00000000 80000000 16117E28 00000000 00000000 1585C2EAR0-7 00000000 16117FA6 00000000 80000000 16117E28 00000000 00000000 1585C2EAR8-F 16117E28 16103E60 16100708 1585B0C2 16116AD8 1585AF7E 16117E34 1585B0C2R8-F 16117E28 16103E60 16100708 1585B0C2 16116AD8 1585AF7E 16117E34 1585B0C2 FR0-6 4E000000034EC1FC 4A4D856DB0000000 0000000081828384 4E00000000009688 FR0-6 4E000000034EC1FC 4A4D856DB0000000 0000000081828384 4E00000000009688 AR0-7 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000AR0-7 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000AR8-F 00000000 00000000 00000000 00000000 00000000 00000001 00000000 00000000AR8-F 00000000 00000000 00000000 00000000 00000000 00000001 00000000 00000000 System Abend Code (hex) 0C4 Abend Reason Code (hex) 00000000 System Abend Code (hex) 0C4 Abend Reason Code (hex) 00000000 Op.Sys. MVS/ESA TP-Mon. CICS Device VIDEO User DMDSAC Op.Sys. MVS/ESA TP-Mon. CICS Device VIDEO User DMDSAC Program DUMPIT Library XDMD Statment 0010 Level 1 Program DUMPIT Library XDMD Statment 0010 Level 1 Pf-Key ENTR InputLen 7 Dialogs 101 Errors 0 Pf-Key ENTR InputLen 7 Dialogs 101 Errors 0 Command RUN *DATA 0 Last Err 0000 Command RUN *DATA 0 Last Err 0000 DB-Call DB/FNR 0/0 DB-Call DB/FNR 0/0

Page 46: Debugging Natural Applications

DebuggingDebuggingReading DumpsReading Dumps

Code S0C4 ILC 0006 PSW 078D10 00 Code S0C4 ILC 0006 PSW 078D10 00 9585C2F09585C2F0 Disp 000014D8 Csect CMZUL Disp 000014D8 Csect CMZUL R0-7 00000000 16117FA6 R0-7 00000000 16117FA6 0000000000000000 80000000 16117E28 00000000 00000000 1585C2EA 80000000 16117E28 00000000 00000000 1585C2EAR8-F 16117E28 16103E60 16100708 1585B0C2 R8-F 16117E28 16103E60 16100708 1585B0C2 16116AD816116AD8 1585AF7E 16117E34 1585B0C2 1585AF7E 16117E34 1585B0C2 1585C2F01585C2F0 D7018114 8114 D7018114 81149102 C5C69102 C5C64780 70285810 P.a.a.j.EF...... Cur. Nucleus 4780 70285810 P.a.a.j.EF...... Cur. Nucleus 1585C300 CEC05B10 CEBC5B10 CEB848E0 729047F0 ..$...$........0 NAT413SH 1585C300 CEC05B10 CEBC5B10 CEB848E0 729047F0 ..$...$........0 NAT413SH 1585C310 70385810 CEB85B10 CEB45B10 CEB048E0 ......$...$..... Load Point 1585C310 70385810 CEB85B10 CEB45B10 CEB048E0 ......$...$..... Load Point 1585C320 729249E0 72944780 705A584C E0085B4C .k...m.....<..$< 15700000 1585C320 729249E0 72944780 705A584C E0085B4C .k...m.....<..$< 15700000 1585C330 E0045B4C E0005440 728A1A14 41E0E008 ..$<... ........ Entry Point 1585C330 E0045B4C E0005440 728A1A14 41E0E008 ..$<... ........ Entry Point 1585C340 47F07038 5840C208 5B40CEFC 5B40CEF8 .0... B.$ ..$ .8 15700000 1585C340 47F07038 5840C208 5B40CEFC 5B40CEF8 .0... B.$ ..$ .8 15700000 1585C350 5440728A 1A144B10 72961211 47B07078 . .......o...... Length 1585C350 5440728A 1A144B10 72961211 47B07078 . .......o...... Length 1585C360 171195D7 60154780 7084BE1F 6020D203 ..nP-....d..-.K. 0025E9F0 1585C360 171195D7 60154780 7084BE1F 6020D203 ..nP-....d..-.K. 0025E9F0 1585C370 601C806C D2076000 80E8D201 600A80E6 -..%K.-..YK.-..W Relocation 1585C370 601C806C D2076000 80E8D201 600A80E6 -..%K.-..YK.-..W Relocation 1585C380 9240601B 484080B6 17EE43E0 810F1B4E k -.. ......a..+ ABSOLUTE 1585C380 9240601B 484080B6 17EE43E0 810F1B4E k -.. ......a..+ ABSOLUTE 1585C390 5440B87A 17114310 810C1211 478070EA . .:....a....... Cur. Location1585C390 5440B87A 17114310 810C1211 478070EA . .:....a....... Cur. Location1585C3A0 06101941 472070EE 49407298 478070EA ......... .q.... NATZUL+14D8 1585C3A0 06101941 472070EE 49407298 478070EA ......... .q.... NATZUL+14D8 1585C3B0 41306028 41F43000 18E11BE4 44E0B88A ..-..4.....U.... Slot Name 1585C3B0 41306028 41F43000 18E11BE4 44E0B88A ..-..4.....U.... Slot Name 1585C3C0 41F06028 17114310 810C1AF1 1BF40640 .0-.....a..1.4. N1 1585C3C0 41F06028 17114310 810C1AF1 1BF40640 .0-.....a..1.4. N1 1585C3D0 4440B890 47F0BD5E 17114310 810C0610 . ...0.;....a... N2 1585C3D0 4440B890 47F0BD5E 17114310 810C0610 . ...0.;....a... N2 1585C3E0 441070FE 47F070EA D2006028 D000187F .....0..K.-...." N3 1585C3E0 441070FE 47F070EA D2006028 D000187F .....0..K.-...." N3 Abend information successfully displayed. Abend information successfully displayed. Command ===> Command ===>

PSW points to instruction: 91 02 C5C6Which is: TM 02 C 5C6R2=00000000; an invalid address.

Page 47: Debugging Natural Applications

DebuggingDebuggingDumpsDumps

DUMPs: Some exceptions to conventions.DUMPs: Some exceptions to conventions.– Language Environment (LE)Language Environment (LE)

Anchor blockAnchor block– First part of Natural’s BBFirst part of Natural’s BB

Error HandlingError Handling– STAE and ESTAESTAE and ESTAE

– CICS CICS Exec. Interface Block (EIB)Exec. Interface Block (EIB) Error HandlingError Handling

– STAE and ESTAESTAE and ESTAE– R15 not returned to Natural directlyR15 not returned to Natural directly

– NaturalNatural RSA 0 – 15 in IOCB and DSARSA 0 – 15 in IOCB and DSA

Page 48: Debugging Natural Applications

DebuggingDebuggingDumpsDumps

0480 NOCOPT MCGEN PCODE0480 OPTIONS MCG=(PGEN=ON)0480 NOCOPT MCGEN PCODE0480 OPTIONS MCG=(PGEN=ON) /* use NOCSHOW to see generated instructions. /* use NOCSHOW to see generated instructions.

0490 ADD #NUM-INPUT (1) #NUM-INPUT (2) GIVING #NUM-ANSWR 0490 ADD #NUM-INPUT (1) #NUM-INPUT (2) GIVING #NUM-ANSWR 001BA 0D9B BASR R9,R11 001BA 0D9B BASR R9,R11 001BC 01E2 DC X'01E2' 001BC 01E2 DC X'01E2' 001BE F248 D100 8008 PACK OP1(5),#VAR0000 001BE F248 D100 8008 PACK OP1(5),#VAR0000 001C4 180F LR R0,R15 001C4 180F LR R0,R15 001C6 17FF XR R15,R15 001C6 17FF XR R15,R15 001C8 43F0 D104 IC R15,OP1+4 001C8 43F0 D104 IC R15,OP1+4 001CC 43FF B488 IC R15,PSGNTR(R15) 001CC 43FF B488 IC R15,PSGNTR(R15) 001D0 42F0 D104 STC R15,OP1+4 001D0 42F0 D104 STC R15,OP1+4 001D4 18F0 LR R15,R0 001D4 18F0 LR R15,R0 001D6 F248 D110 8011 PACK OP2(5),#VAR0000 001D6 F248 D110 8011 PACK OP2(5),#VAR0000 001DC 180F LR R0,R15 001DC 180F LR R0,R15 001DE 17FF XR R15,R15 001DE 17FF XR R15,R15 001E0 43F0 D114 IC R15,OP2+4 001E0 43F0 D114 IC R15,OP2+4 001E4 43FF B488 IC R15,PSGNTR(R15) 001E4 43FF B488 IC R15,PSGNTR(R15) 001E8 42F0 D114 STC R15,OP2+4 001E8 42F0 D114 STC R15,OP2+4 001EC 18F0 LR R15,R0 001EC 18F0 LR R15,R0

Page 49: Debugging Natural Applications

DebuggingDebuggingReading DumpsReading Dumps

0001E4 43FF B488 IC R15,PSGNTR(R15) 0001E4 43FF B488 IC R15,PSGNTR(R15) 0001E8 42F0 D114 STC R15,OP2+4 0001E8 42F0 D114 STC R15,OP2+4 0001EC 18F0 LR R15,R0 0001EC 18F0 LR R15,R0 0001EE FA44 D100 D110 AP OP1(5),OP2(5) 0001EE FA44 D100 D110 AP OP1(5),OP2(5) 0001F4 F384 801F D100 UNPK #VAR8004,OP1(5) 0001F4 F384 801F D100 UNPK #VAR8004,OP1(5) 0001FA 180F LR R0,R15 0001FA 180F LR R0,R15 0001FC 17FF XR R15,R15 0001FC 17FF XR R15,R15 0001FE 43F0 8027 IC R15,#VAR8004+8 0001FE 43F0 8027 IC R15,#VAR8004+8 000202 43FF B528 IC R15,ZSGNTR(R15) 000202 43FF B528 IC R15,ZSGNTR(R15) 000206 42F0 8027 STC R15,#VAR8004+8 000206 42F0 8027 STC R15,#VAR8004+8 00020A 18F0 LR R15,R0 00020A 18F0 LR R15,R0 0500 MOVE #NUM-ANSWR TO #HEX-ANSWR 0500 MOVE #NUM-ANSWR TO #HEX-ANSWR 00020C 0D9B BASR R9,R11 00020C 0D9B BASR R9,R11 00020E 01F4 DC X'01F4' 00020E 01F4 DC X'01F4' 000210 F278 D128 801F PACK WORK1+8(8),#VAR8004 000210 F278 D128 801F PACK WORK1+8(8),#VAR8004 000216 180F LR R0,R15 000216 180F LR R0,R15 000218 17FF XR R15,R15 000218 17FF XR R15,R15 00021A 43F0 D12F IC R15,WORK1+15 00021A 43F0 D12F IC R15,WORK1+15 00021E 43FF B488 IC R15,PSGNTR(R15) 00021E 43FF B488 IC R15,PSGNTR(R15)

Page 50: Debugging Natural Applications

DebuggingDebuggingLanguage EnvironmentLanguage Environment

Language Environment overviewLanguage Environment overview– CLERCLER

TRAP ON/OFFTRAP ON/OFF Posix ON/OFFPosix ON/OFF

– CEEDUMPCEEDUMP– Performance costsPerformance costs

Calling “main” level modulesCalling “main” level modules Initializing LE environment before callsInitializing LE environment before calls

Page 51: Debugging Natural Applications
Page 52: Debugging Natural Applications

DebuggingDebuggingTraces/LogsTraces/Logs

Commands: Commands:

%TRE ON : Activate external trace. %TRE ON : Activate external trace.

%TRE OFF : Deactivate external trace. %TRE OFF : Deactivate external trace. Commands: Commands:

%TRI ON : Activate internal trace. %TRI ON : Activate internal trace.

%TRI OFF : Deactivate internal trace. %TRI OFF : Deactivate internal trace.

Note: Do not use this command without prior consultation of Note: Do not use this command without prior consultation of Software AG support. This function is intended primarily for Software AG support. This function is intended primarily for Software AG internal use Software AG internal use

for debugging purposes. (for debugging purposes. (Receives NAT1134)Receives NAT1134)

TRITRI passes trace data to the SYSRDC utility. passes trace data to the SYSRDC utility. TRETRE passes data to an external dataset (depending on the TP passes data to an external dataset (depending on the TP

monitor).monitor).

Page 53: Debugging Natural Applications

DebuggingDebuggingAsync sessionsAsync sessions

Using the TPF ParameterUsing the TPF Parameter Using Asynchronous Natural SessionsUsing Asynchronous Natural Sessions Using the TPF ParameterUsing the TPF ParameterThe dynamic parameter TPF=(TPF1,TPF2,TPF3,TPF4,TPF5,TPF6,TPF7,TPF8) can be set for driver-The dynamic parameter TPF=(TPF1,TPF2,TPF3,TPF4,TPF5,TPF6,TPF7,TPF8) can be set for driver-

specific options by specifying "1" for the corresponding option. specific options by specifying "1" for the corresponding option. Supported options are:Supported options are:TPF1TPF1Invoke Adabas linkage module via EXEC CICS LINK with Adabas parameter in TWA and CICS Invoke Adabas linkage module via EXEC CICS LINK with Adabas parameter in TWA and CICS

COMMAREA rather than via DCI.COMMAREA rather than via DCI.Enables debugging of Adabas-related problems via CEDF.Enables debugging of Adabas-related problems via CEDF.TPF3TPF3Dump the whole Natural buffer Dump the whole Natural buffer pool.pool.With this parameter setting, the entire Natural buffer pool is included in a CICS With this parameter setting, the entire Natural buffer pool is included in a CICS transaction dump.transaction dump.Note: Usually the Natural buffer pool is not required in a dump, as all objects from Note: Usually the Natural buffer pool is not required in a dump, as all objects from the buffer pool relevant to a session are dumped anyway; so this option may only be the buffer pool relevant to a session are dumped anyway; so this option may only be required in the case of a buffer pool problem.required in the case of a buffer pool problem.TPF4TPF4Dump the whole EDITOR buffer pool.Dump the whole EDITOR buffer pool.With this parameter setting, the EDITOR buffer pool is included in a CICS transaction With this parameter setting, the EDITOR buffer pool is included in a CICS transaction dump. dump. TPF6TPF6Handle terminal I/O errors by NCIHandle terminal I/O errors by NCIWith this parameter setting, NCI will not pass control back to Natural for terminal I/O With this parameter setting, NCI will not pass control back to Natural for terminal I/O errors, but will handle it by itself, which results in one of the error messages NT06 - errors, but will handle it by itself, which results in one of the error messages NT06 - NT13.NT13.TPF7TPF7Force abend in case of NCI system errorsForce abend in case of NCI system errorsWith this parameter setting, a program check is forced in case of NSWith this parameter setting, a program check is forced in case of NSxxxx, NI, NIxxxx, NR, NRxxxx or or NUSNUSnnnnnnnn error messages. This is particularly helpful when a debugging tool intercepting error messages. This is particularly helpful when a debugging tool intercepting abends is active. Then the error can be analyzed directly online.When specifying "0" abends is active. Then the error can be analyzed directly online.When specifying "0" (which can also be omitted), the corresponding option is not set, for example:(which can also be omitted), the corresponding option is not set, for example:

TPF=(0,0,0,1)      which is equivalent to TPF=(,,,1)TPF=(0,0,0,1)      which is equivalent to TPF=(,,,1)

Using Asynchronous Natural SessionsUsing Asynchronous Natural SessionsIf the first 5 characters in the dynamic parameter string for starting Natural are "ASYN,", If the first 5 characters in the dynamic parameter string for starting Natural are "ASYN,",

the Natural CICS interface will always setup an asynchronous Natural session, the Natural CICS interface will always setup an asynchronous Natural session, regardless of whether the session is terminal-bound or not.regardless of whether the session is terminal-bound or not.

This may be helpful for testing purposes, particularly with EDF or with other debugging This may be helpful for testing purposes, particularly with EDF or with other debugging tools installed.tools installed.


Recommended