Beruflich Dokumente
Kultur Dokumente
6-1
breakpoints display and change values of program variables step through the execution of an RPG IV program
Use the watch feature of the ILE Debugger
OL866000
Set breakpoints by cursor position Step through source statements Display / change values of program variables Watch the value of a variable change as program executes
Display or change values of variables, structures and expressions Set a watch for a variable Search for strings in source code Set up shorthand notation to reduce keying Navigate through the source code
OL866105
6-4
OL866110
2. CALL PGM(RPG4PGM)
View source, set/clear breakpoints, display/change variables, etc.
FItem_PF IF FItemList O
C If ** Headings on first page C Write C Eval C Endif C C ** Page overflow C C C Read If Write Eval Endif
*InLR Footing
Debug . . . _________________________________________________________ _______________________________________________________________________ F3=End program F6=Add/Clear breakpoint F10=Step F11=Display variable F12=Resume F17=Watch variable F18=Work with watch F24=More keys
OL866120
6-6
6-7
OL866125
6-8
OL866130
Watching a Variable
Display Module Source Program: 1 2 3 4 5 6 7 8 9 10 11 12 13 DEBUGDEMO Library: ** Declare variables D Count S D Sum S OL86V3LIB Module: DEBUGDEMO
3P 0 Inz(1) 5P 0
** Loop 5 times and accumulate C Dow Count <= 5 C Eval Sum = Sum + Count C Eval Count = Count + 1 C Enddo ** End program - what are the values of Sum and Count ? C Eval *InLR = *ON C Return Bottom
Debug . . . watch sum_______________________________________________ ______________________________________________________________________ F3=End program F6=Add/Clear breakpoint F10=Step F11=Display variable F12=Resume F17=Watch variable F18=Work with watch F24=More keys
OL866132
6-9
6-10
OL866135
6-11
OL866140
6-12
OL866145
Tools
DEBUG on H-spec DUMP opcode STRSRVJOB Joblog
OL866200
S S S S S S S S
6 INZ(120697) 6 0 INZ 8 INZ 8 INZ 6 2 INZ(-123.58) 7 3 INZ(9457.323) 15 INZ( RPG IV Workshop ) 6 MOVE DaMoYr MOVEL (P) Date MOVEL Name MOVEL Amount MOVE Amount Eval Dump *InLR = *ON Date Field1 Class Field2 Amount2
OL866205
H8 KH KS
L8 OV U8 08 18 28
0 VALUE -0123.58 0012358D X -9012.358 9012358D X RPG IV D9D7C740C9E5 X 120697 F1F2F0F6F9F7 X 120697. 0120697F X 120697 F1F2F0F6F9F74040 X 01235Q F0F1F2F3F5D84040 X RPG IV Workshop D9D7C740C9E540E6969992A2889697 X
OL866210
ATTRIBUTES PACKED(6,2) PACKED(7,3) CHAR(6) CHAR(6) PACKED(6,0) CHAR(8) CHAR(8) CHAR(15) VALUE IN HEX
6-17
STRSRVJOB
STRSRVJOB
TRCJOB *ON/*OFF/*END
OL866215
1.
Job 025627/RJSLANEY/QPADEV0005 started on 05/03/00 at 14:37:26 in subsystem Error message CPF4101 appeared during OPEN for file BFDSUBST (C S D F). 2. Additional Message Information RNQ1216 Inquiry 07/28/97 Severity . . . . . . . : Time sent . . . . . . : 99 14:
Message . . . . : Error message CPF4101 appeared during OPEN for file BFDSUBST (C S D F). Cause . . . . . : RPG procedure BFRSUBST in program OL86V3LIB/BFRSUBST received the message CPF4101 while performing an implicit OPEN operation file BFDSUBST. Recovery . . . : Check the job log for a complete description of message CPF4101, and contact the person responsible for program maintenance. file has a device type of SPECIAL, there may be no message in the joblog Possible choices for replying to message . . . . . . . . . . . . . . . D -- Obtain RPG formatted printout of system storage. S -- Obtain printout of system storage. F -- Obtain full formatted printout of system storage.
OL866220
3. Joblog 4>> CALL OL86V3LIB/BFRSUBST File BFDSUBST in library *LIBL not found or inline data file missing. Error message CPF4101 appeared during OPEN for file BFDSUBST. Function check. RNX1216 unmonitored by BFRSUBST at statement 0001000001, instruction X 0 0 0 0 . Error message CPF4101 appeared during OPEN for file BFDSUBST (C S D F). Error message CPF4101 appeared during OPEN for file BFDSUBST (C S D F).
OL866225
6-21
OL86610L
Unit Summary
Having completed this unit, you should be able to:
Describe the benefits of source view and listing view debugging Use compile options to specify desired level of debugging Use the source debugger to use:
breakpoints display and change values of program variables step through the execution of an RPG IV program
Use the watch feature of the ILE Debugger
Copyright IBM Corp. 1996, 2000 6-22
OL866999