DEBUG SQR Code Within The PeopleSoft Application



There are two debugging related SQR flags used to help troubleshoot problematic SQR programs.  When these flags are added to the command line, more detailed information is added to the current SQR program log file.

SQR flags used for debugging:

-DEBUG

Setting the -DEBUG flag on the SQR command line will turn on all code found within the current SQR program run where the program line starts with a DEBUG compiler directive.  This means that if the SQR program was submitted with the -DEBUG flag that matches the DEBUG code then the code will be compiled to be executed for this instance of the program run.  If unsure which debug code is being used for a particular SQR program, open the SQR program code (within a text editor of your choice) and search for all occurrences of the word "DEBUG" (note: some environments, search may be case-sensitive).

SQR Code Examples:

#DEBUG   <some command>   <-- in case of DEBUG flag do some command
#DEBUGA <some command>  <-- in case of DEBUGA flag do some command
#DEBUGB <some command>  <-- in case of DEBUGB flag do some command

Command Line DEBUG Flag Examples:

-DEBUG  <-- execute DEBUG code
-DEBUGA  <-- execute DEBUG and DEBUGA code
-DEBUGB  <-- execute DEBUG and DEBUGB code
-DEBUGAB  <-- execute DEBUG, DEBUGA and DEBUGB code


-S

Setting the -S flag on the SQR command line will turn on SQL cursor status logging within the current SQR program run.  This means that cursor and cursor status information will be appended to the SQR log file for this instance of the program run.


STEPS for setting -DEBUG and -S flags

To set the "-S" or "-DEBUG" flags within the Oracle PeopleSoft application for troubleshooting a particular process:

1) Open the related Process Definition (navigation: PeopleTools > Process Scheduler > Processes) and go to the "Override Options" tab.  
2) From here you can append either flag (or both flags separated by a space) to the parameter list by entering them in the "Parameter List" field and setting the Parameter List drop-down to "Append".
3) Save the Process Definition.  

Note: Once this has been done, any time a new process request for this process is submitted, the flags will be appended and extra information added to the SQR log file for further analysis.  For the flags to fully take effect for existing process requests, due to cache related scenarios, affected Process Scheduler domains may need to be recycled, (and possibly cache cleared), before the cache is refreshed with the new Process Definition parameters.

Read More
http://www.mybasicknowledge.blogspot.com/2012/08/peoplesoft-configuration-settings-for.html