Wednesday, May 1, 2013

PeopleSoft Trace PeopleCode


One can generate a trace while the subscription PeopleCode get executed by using the following two functions in the subscription PeopleCode:
SetTracePC(0);
SetTraceSQL(0);


Example:
SetTracePC(384);
/* REM PeopleCode Statements to be traced */
Local string &St_temp_l;
/* More PeopleCode statements */
SetTracePC(0);

1 comment:

  1. In case trace can't be enabled, use writeline finction:

    &fileLog = GetFile("C:\temp\LOGFILE.log", "w", "a", %FilePath_Absolute);
    &fileLog.WriteLine("Begin");
    &fileLog.WriteLine("End");
    &fileLog.Close();

    ReplyDelete