Oracle PeopleSoft

Extracting the call stack from a PeopleCode trace

I’ve added another tool to the PeopleCodeTools Sublime Text plugin that allows you to extract the call stack from a PeopleCode trace. You can find it on the PeopleCodeTools repository on github along with the syntax highlighters for PeopleCode and PeopleSoft trace files. For those unfamiliar with installing this plugin, please see my previous post: PeopleCodeTools – Syntax Highlighting for Sublime Text This tool only applies to PeopleSoft Trace Files that have at a minimum the following trace…

Continue reading

PeopleSoft

FTP Class in PeopleSoft

Here’s a class I created to allow FTP from within PeopleSoft. Use it at your own risk:

Continue reading

PeopleSoft

Using Rept to pad zeroes

I was creating a PeopleCode script to populate test persons in my database. I needed the persons to have IDs that would be padded with 0s where necessary. For example:

Solution: 1. Determine how many people you are creating (eg. 100). 2. Find the number of digits of that number (eg. 100 has 3 digits) 3. Subtract that from the number of the person that you’re currently trying to create an id for (eg.…

Continue reading

PeopleSoft

FindFiles function does not return a sorted array

I had a series of files with the following names: JM001.pdf JM002.pdf JM003.pdf .. JM100.pdf JM101.pdf One silly assumption that I made was that the FindFiles PeopleCode function returned a sorted array of strings. While this seemed to be the case on Windows environments, it was not the case on UNIX systems. Fortunately all I had to do was sort the array in ascending order after the call to FindFiles:

Continue reading

PeopleSoft

PeopleCodeTracing

There’s a simple way to turn peoplecode and SQL tracing on and off using peoplecode, rather than having to set the trace values when you login or via PeopleTools > Utilities > Debug. You can use these commands to trace/debug only the peoplecode you’re interested in. For peoplecode tracing, you set the trace flags using the SetTracePC() function. e.g

… will set the trace flags as per the defaults on the Trace Peoplecode page.…

Continue reading

PeopleSoft Text Editor

PeopleSoft Function List Settings

Sometimes when I’m performing an Impact Analysis I like to use an alternative text editor (eg. EditPlus) to look for literal strings, or method calls. The function list feature helps me to easily navigate to the previous or next function/method. Here are the PeopleSoft Function list regex settings that I created to help me quickly navigate to functions/methods and the overall object that those functions/methods reside in:

Continue reading

PeopleSoft

Adding line endings to a string

Here’s some PeopleCode I wrote that will add a carriage return and line feed to the end of a String if it is not empty:

or as a method:

Note: This assumes that you want Windows line endings. Typically unix line endings just have a single line feed (Char(10) with no carriage return.

Continue reading