Mohit Jain Tracing in PeopleSoft Applications


The FMS EX team's Mohit Jain has consolidated some of the most frequently used tracing methods that are used within PeopleSoft Applications, covering Application Engine , PeopleCode , Integration Broker , nVision , Cobol & SQR tracing.

 

Application Engine Trace

For Application Engine programs, Open the Process Definition under PeopleTools, Process Scheduler.  Go to the Override tab, and on the Parameter list line select Append from the dropdown, and in the edit box next to it, enter the desired combination of traces, they all are -

Parameter List    Append    -TRACE 7 -TOOLSTRACEPC 4044  -TOOLSTRACESQL 31

 

Save the Definition and this program will be traced each time it is run, until this is removed.  Using both the -TOOLSTRACEPC & -TOOLSTRACESQL together should only be done when required, as the output from both go into the same file, making it very large and difficult to read.  For normal program tracing use-

 

-TRACE 7 -TOOLSTRACEPC 4044

 

Give the Application Engine Trace, which traces the SQL in an Application Engine program, and the PeopleSoft Trace, which is the people code trace.

 

The above settings have equivalent settings in psprcs.cfg, they are-

 

TraceAE=    -TRACE  output goes into Application Engine Trace (.AET)

TracePC=    -TOOLSTRACEPC  output goes into the PeopleTools trace file (.trc)

TraceSQL=  -TOOLSTRACESQL output ALSO goes into the PeopleTools trace file (.trc)

 

With the AE traces done like this, every time any program that runs  on that process scheduler will be traced.  You need  to undo all of this setting back to None in Process Definitions will turn it off.

 

PeopleCode Online Trace

For tracing PeopleCode/SQL, debug values can be setup in the PIA while performing the transactions. You can use this before performing the actual transaction to ensure only useful trace information is fetched for analysis.  Open Trace PeopleCode/SQL under PeopleTools, Utilities, Debug.  When you want to take online trace for a transaction, follow these steps-

  a) Go to folder of the component or stop before doing a suspected transaction

    b) Open a new window and go to PeopleTools > Utilities > Debug > Trace PeopleCode

201509_PCodeTrace01.png

    c) Apply PC parameters, for ex. PC= 4044 (4+8+64+128+256+512+1024+2048) and save.

    d) Open one more new window, go to PeopleTools > Utilities > Debug > Trace SQL

201509_PCodeTrace02.png

    e) Apply SQL trace parameters, for ex. SQL = 7 (1+2+4)

    f) Go back to the transaction/launch the component and perform your desired action.

    g) As soon as you get the error press ok and signout.

    h) Pull the trace file from appserver logs and attach it to the SR.

The generated trace files can be located under PS_HOME/appserv/<DBNAME>/Logs/ directory of the application with a file extension of tracesql.

 

SQR Trace

SQR Report traces are a bit different than the Application Engine traces, Cobol traces, and online traces.

You can enable tracing for any particular Application Engine process or Cobol process, or trace any online user action. Development doesn't have to do anything specific when creating that Application Engine process, or Cobol process, or wrote the PeopleCode for a particular functionality.

This is not the case with SQR Reports. A SQR Report must have been explicitly written by the developers to include trace code. If the SQR Report does not have trace code, no information will be provided in the trace file.

1. Search for the file of the SQR you want to trace in your ‘%PS_HOME%\sqr’ directory.

2. Open the copy of the SQR file with a text editor such as Notepad.

3. Search for the keyword 'debug' or 'DEBUG' from top to bottom and write down the letters (the case is important) that are after the word 'debug' or 'DEBUG' (in the example below, there are a 'DEBUGA and a' 'DEBUGB' a so write down A and B). Again, this is not available in all SQR Report. The SQR Report must have been explicitly written by the developers to include trace code. If the SQR Report does not have trace code, the ‘–debug’ flag will not provide any tracing information.

201509_SQRTrace01.png

4. Sign in the PIA.

5. Navigate to the ‘Processes’ component and select the SQR Report that you would like to get a trace on. Be careful because there’s also a Process Type called ‘SQR Process’. What you need is the ‘SQR Report’ Process Type.

6. Go to the ‘Override Options’ tab, set the ‘Parameter List’ option to ‘Append’, add the SQR flags in the text box, and save.  -debugXYZ -S

201509_SQRTrace02.png

    • XYZ should be replaced by the letters you found at step 3. (the letter case is important).

    • Each SQR flag is separated by a blank space.

    • -S shows SQL cursors.

    The letter F is often used for program flows, D for data, and T for timing information. Other letters such A or B are used for additional information.

7. Go ahead and run the SQR that you would like to get a trace on. Get the trace file in the ‘Process Requests’ component, click on the ‘Details’ hyperlink for your Process Instance.

8. Do not forget to turn tracing off by setting the ‘Parameter List’ option to ‘None’ in the ‘Process Definitions’ component – ‘Override Options’ tab and saving.

 

Integration Broker - Subscription Trace

 

This type of trace is used in conjunction with PC and SQL trace to debug the handlers written for service operation. This may require help of your technical team as there are few code lines that need to be added to the handler App Package.  Code lines marked in red are added to the method of the Application Class for setting up trace values.

201509_IBTrace01.png

The generated trace files can be located under PS_HOME/appserv/<DBNAME>/Logs/ directory of the application.

 

Note :  At the end of trace generation, turn off the App Package trace setting (by removing the 4 lines Marked in Red.)

 

COBOL Trace


1) If the COBOL process is going to be run on a Windows scheduler:

    a) Open the appropriate  Process Type Definition, for example;

 

          Process Type: COBOL SQL

          Operating System: Windows

          Database Type: Oracle

 

    b) Copy the whole parameter list line into your clipboard.

          %%DBTYPE%%/%%DBNAME%%/%%OPRID%%/%%OPRPSWD%%/%%RUNCNTLID%%/%%INSTANCE%%//%%DBFLAG%%

    c) Open the Process Definition for the particular COBOL Process that needs to be traced e.g PTPDBTST, go to the Override Options Tab, and on the Parameter List line, select          Override from the drop down.

    d) In the Parameters edit box, paste the whole parameter list from the Process Type Definition retrieved earlier.

          %%DBTYPE%%/%%DBNAME%%/%%OPRID%%/%%OPRPSWD%%/%%RUNCNTLID%%/%%INSTANCE%%//%%DBFLAG%%

    e) Notice at the end of the line after the %%INSTANCE%% and before the %%DBFLAGS%% there are 2 forward slashes //

        Insert the desired bit map number inbetween the slashes.  Choose the bitmap number desired ( e.g 255 ) for the trace, and put it between the slashes per the following.

        %%DBTYPE%%/%%DBNAME%%/%%OPRID%%/%%OPRPSWD%%/%%RUNCNTLID%%/%%INSTANCE%%/255/%%DBFLAG%%

    f) Save the Process Definition. Launch the COBOL program through a PSNT scheduler.

    g) Navigate to the Process Monitor, Details, Parameter List, and you should see the expanded command line with the trace value inserted.

          Command Line:

          C:\BLD\G\H910\ORA\H910GXBU\CBLBINU\PTPDBTST.EXE ORACLE/H910GXBU/PS/OPRPSWD/1/5057/255/0

          Working Dir:

          C:\apps\db\ora\64bit\BIN

 

2) If the COBOL process is going to be run on a UNIX/Linux scheduler:

    a) Open the appropriate Process Type Definition, for example;

 

          Process Type: COBOL SQL

          Operating System: Unix

          Database Type: Oracle

 

    b) Copy the whole parameter list line into your clipboard.

          %%PRCSNAME%% %%DBTYPE%%/%%DBNAME%%/%%OPRID%%/%%OPRPSWD%%/%%RUNCNTLID%%/%%INSTANCE%%//%%DBFLAG%%

    c) Open the Process Definition for the particular COBOL Process that needs to be traced e.g PTPDBTST, go to the Override Options Tab, and on the Parameter List line, select          Override from the drop down.

    d) In the Parameters edit box, paste the whole parameter list from the Process Type Definition retrieved earlier.

          %%PRCSNAME%% %%DBTYPE%%/%%DBNAME%%/%%OPRID%%/%%OPRPSWD%%/%%RUNCNTLID%%/%%INSTANCE%%//%%DBFLAG%%

    e) Notice at the end of the line after the %%INSTANCE%% and before the %%DBFLAGS%% there are 2 forward slashes //

          Insert the desired bit map number inbetween the slashes.  Choose the bitmap number desired ( e.g 255 ) for the trace, and put it between the slashes per the following.

          %%PRCSNAME%% %%DBTYPE%%/%%DBNAME%%/%%OPRID%%/%%OPRPSWD%%/%%RUNCNTLID%%/%%INSTANCE%%/255/%%DBFLAG%%

    f) Save the Process Definition. Launch the COBOL program through a PSUNX scheduler.

    g) Navigate to the Process Monitor, Details, Parameter List, and you should see the expanded command line with the trace value inserted.

          Command Line:

          PSRUN PTPDBTST ORACLE/E91DMO/VP1/%OPRPSWD%/1/475/255/%DBFLAG%

          Every time the program runs, it will be traced.

 

PS/nVision Trace

 

By default, PS/nVision does not generate trace files because extensive tracing can affect system performance. You can enable tracing and determine the tracing level when you need debugging. You configure PS/nVision tracing on the web using the Trace Level setting in the PeopleSoft Process Scheduler configuration file's nVision section. The default value is 0.

 

PS/nVision supports five tracing levels: 0, 1, 2, 3, and 4. The following table shows the level of tracing for each value.

201509_NVisionTrace01Y.png

Viewing the Trace Files for PS/nVision on Windows-

In Microsoft Windows PS/nVision, the trace file is generated in your system temporary directory; for example c:\temp\psnvs_123.nvt.

 

Viewing the Trace Files on the Web-

On the web, because PeopleSoft Process Scheduler initiates all PS/nVision processes, it is also responsible for displaying PS/nVision trace information in the Process Monitor after PS/nVision reports are run to completion. The PS/nVision trace files are independent of the Process Scheduler's status of the report running, and are always posted regardless of your output types or formats. Trace files are secured by the same user list as the report, so only the same set of users can view them.

PS/nVision trace files are automatically purged when the reports are purged in the time frame that you have set from the Process Scheduler System Purge Option. You can view trace files from the View Trace/Log page in Process Monitor for your completed process instance.

To view a trace file:

1. Select select PeopleTools, then select Process Scheduler, then select Process Monitor.

2. Find the process instance that runs your nVision report, and then click the Details link to access the Process Details page.

3. Click the View/Trace Log link to access the Message Log page.

4. Click the nVision Trace link to view the trace file.

If Process Scheduler has restarted your nVision report running process, this procedure generates multiple nVision trace files (one for each retry).