Start of change

Tracing a DATA-INTO parser

If you want to know the sequence of calls from the parser, including the names and values, use the QIBM_RPG_DATA_INTO_TRACE_PARSER environment variable to enable tracing. See the DATA-INTO section of the IBM® Rational® Development Studio for i: ILE RPG Reference.

Here is an example of a trace:

---------------- Start ---------------
ReportName:  'petInfo'
StartStruct
 ReportName:  'pets'
 StartArray
  StartStruct
   ReportName:  'name'
   ReportValue:  'Spot'
   ReportName:  'type'
   ReportValue:  'dog'
   ReportName:  'age'
   ReportValue:  '3'
  EndStruct
  StartStruct
   ReportName:  'name'
   ReportValue:  'Puff'
   ReportName:  'type'
   ReportValue:  'cat'
   ReportName:  'age'
   ReportValue:  '7'
  EndStruct
 EndArray
 ReportName:  'veterinarian'
 ReportValue:  'Dr Smith'
EndStruct
---------------- Finish --------------
Note: If the trace output does not show up immediately, or if it flashes too quickly to see, you can view the standard output by calling the following ILE RPG program. Compile the program with CRTBNDRPG.

**FREE
CTL-OPT ACTGRP(*NEW);
DCL-PR printf EXTPROC(*DCLCASE);
  p POINTER VALUE OPTIONS(*STRING : *NOPASS);
END-PR;
DCL-PR getchar INT(10) EXTPROC(*DCLCASE) END-PR;
DCL-C EOL x'15';

printf (EOL);
getchar ();
return;
The following C program will accomplish the same thing. Compile the program with CRTBNDC.

#include <stdio.h>
main()
{
   printf("\n");
   getchar();
}
End of change