IBM AS/400 Frozen Dessert Maker User Manual


 
Sample Source for Debug Examples
*-----------------------------------------------------------------*
* After the following SETON operation, *IN02 = 1.
*-----------------------------------------------------------------*
C SETON 020406
C IF *IN02 = '1'
C MOVE '1994-09-30' BigDate
C ENDIF
*-----------------------------------------------------------------*
* Put a new value in the second cell of Arry.
*-----------------------------------------------------------------*
C MOVE 4 Arry
*-----------------------------------------------------------------*
* Now start a formatted dump and return, by setting on LR.
*-----------------------------------------------------------------*
C DUMP
C SETON LR
*=================================================================*
* Define the subprocedure Switch.
*=================================================================*
P Switch B
D Switch PI
D Parm 1A
*-----------------------------------------------------------------*
* Define a local variable for debugging purposes.
*-----------------------------------------------------------------*
D Local S 5A INZ('aaaaa')
C IF Parm = '1'
C EVAL Parm = '0'
C ELSE
C EVAL Parm = '1'
C ENDIF
P Switch E
*=================================================================*
* Compile-time data section for Table. *
*=================================================================*
**
aaa
bbb
ccc
Figure 105 (Part 4 of 4). Source for Module DBGEX. DBGEX is the main module of the
program DEBUGEX.
*=================================================================*
* RPGPGM - Program called by DEBUGEX to illustrate the STEP *
* functions of the ILE source debugger. *
* *
* This program receives a parameter InputParm from DEBUGEX, *
* displays it, then returns. *
*=================================================================*
D InputParm S 4P 3
C *ENTRY PLIST
C PARM InputParm
C InputParm DSPLY
C SETON LR
Figure 106. Source for OPM Program RPGPGM
Chapter 11. Debugging Programs 215