Trace Application Engine Program PeopleSoft

Any normal PeopleSoft user will find it easy to perform an online application server trace after reading our earlier posts on Tracing PeopleCode. However, it is rather incomplete as it does not tell how to trace an Application Engine Program or COBOL Processes inside a PeopleSoft application. As a PeopleSoft Developer, I had to end up tracing my Application Engine Programs often and to those, who don’t know how to do it, it can turn into a fairly complex process.

In this post, we will explain how to perform a trace and pick up the trace file for Application Engine programs or any program that uses the PeopleSoft process scheduler.In order to do a trace for your AE program, navigate to the following location

PeopleTools –> Process Scheduler –> Process Definition

Now, you need to perform a search under Process Definition and open the program for which you need a trace. When you find your program, follow the steps provided in the screenshot below

Tracing PeopleSoft Application Engine Programs
Setting Trace Options for Application Engine Under Process Definition

1) First click on Override Options
2) Select “Append” from the Parameter List
3) Enter the trace options in the Text box against Parameter List
4) Hit Save on the page. The Application Engine program is now ready for tracing.

After you do this, every time you run the program the program will be traced by PeopleSoft automatically. You will have to reset or remove the trace options if you do not want to happen like this. You can also use SetTracePC and SetTraceSQL documented earlier, if you want to trace PeopleCode Programmatically. Another trace option is shown below

-TRACE 7 -TOOLSTRACEPC 4044  -TOOLSTRACESQL 31

Now, you have to note that you can use the options TOOLSTRACEPC and TOOLSTRACESQL together only when it is required as the output in both the cases will go to the same trace file. Your trace file can turn out to be quite big when you combine both these options. The trace can also be activated through the process scheduler configuration file. (psprcs.cfg). The equivalent settings in the process scheduler file are provided below

Settings in psprcs.cfg
Settings in Process Definition
Notes
TraceAE
-TRACE
Output is sent to Application Engine Trace (AET) file
TracePC
TOOLSTRACEPC
Output goes to PeopleCode trace file(.trc)
TraceSQL
TOOLSTRACESQL
Output goes to PeopleCode trace file (.trc)

To arrive at the trace bitmap numbers, you can follow the documentation below. Just add the numbers and set to the trace option accordingly.
; Bit       Type of tracing
; ---       ---------------
; 1         - Trace STEP execution sequence to AET file
; 2         - Trace Application SQL statements to AET file
; 4         - Trace Dedicated Temp Table Allocation to AET file
; 8         - not yet allocated
; 16        - not yet allocated
; 32        - not yet allocated
; 64        - not yet allocated
; 128       - Timings Report to AET file
; 256       - Method/BuiltIn detail instead of summary in AET Timings Report
; 512       - not yet allocated
; 1024      - Timings Report to tables
; 2048      - DB optimizer trace to file
; 4096      - DB optimizer trace to tables
TraceAE=0

No comments:

Post a Comment