Tracing a DATA-GEN operation
If you want to know the sequence of the calls from DATA-GEN to the generator and the calls from the generator back to DATA-GEN using the callback procedures, use the QIBM_RPG_DATA_GEN_TRACE environment variable to enable tracing. See the DATA-GEN section of the IBM® Rational® Development Studio for i: ILE RPG Reference.
Here is an example of a trace:
- The generator has written its own trace message. The nested parameter was '0', so the trace message was printed started in column 1.
- The generator has called the QrnDgAddText callback procedure.
- The generator has written its own trace message. The nested parameter was '1', so the trace message was printed at the current indent level.
Start DATA-GEN
Event 3 (Start)
Event 5 (StartStruct) for ds
Terminate event enabled 1
Event 11 (ScalarValue) for item
AddText: 'Book' 2
Event 11 (ScalarValue) for price
AddText: '25.99' 2
Event 11 (ScalarValue) for discount
Looking up the discount 3
AddText: 'sub=-12.50' 2
Event 6 (EndStruct) for ds
Event 4 (End)
Event 12 (Terminate)
End DATA-GEN
Note:
The trace output may not show up immediately, or it may flash by too quickly to see.
For information on how to handle this situation, see
Tracing a DATA-INTO parser.
