IBM AS/400 Frozen Dessert Maker User Manual


 
Sample Source for Debug Examples
*=================================================================*
* Now the operation to modify values or call other objects.
*=================================================================*
*-----------------------------------------------------------------*
* Move 'a's to the data structure DS2. After the move, the
* first occurrence of DS2 contains 10 character 'a's.
*-----------------------------------------------------------------*
C MOVE *ALL'a' DS2
*-----------------------------------------------------------------*
* Change the occurrence of DS2 to 2 and move 'b's to DS2,
* making the first 10 bytes 'a's and the second 10 bytes 'b's.
*-----------------------------------------------------------------*
C 2 OCCUR DS2
C MOVE *ALL'b' DS2
*-----------------------------------------------------------------*
* Fld1a is an overlay field of Fld1. Since Fld1 is initialized
* to 'ABCDE', the value of Fld1a(1) is 'A'. After the
* following MOVE operation, the value of Fld1a(1) is '1'.
*-----------------------------------------------------------------*
C MOVE '1' Fld1a(1)
*-----------------------------------------------------------------*
* Call the program RPGPGM, which is a separate program object.
*-----------------------------------------------------------------*
C Plist1 PLIST
C PARM Parm1
C CALL 'RPGPGM' Plist1
*-----------------------------------------------------------------*
* Call c_proc, which imports ExportFld from the main procedure.
*-----------------------------------------------------------------*
C EVAL SpcPtr = c_proc(SpcSiz : 'P')
*-----------------------------------------------------------------*
* Call a local subprocedure Switch, which reverses the value of
* an indicator.
*-----------------------------------------------------------------*
C EVAL *IN10 = '0'
C CALLP Switch(*in10)
Figure 105 (Part 3 of 4). Source for Module DBGEX
214 ILE RPG for AS/400 Programmer's Guide