Sat 25 Aug 2007
Tue 21 Aug 2007
Using MsgGetText to Concatenate Strings
Posted by ChiliJoe under PeopleSoft • Tips & Techniques • PeopleCode1 Comment
Lately, I’ve been using the MsgGetText() built-in function to concatenate adhoc strings in PeopleCode. For example, instead of the following:
Local string &TEXTLINE = "Value of " | &fld1name | " is " | &fld1value | ".";
Using MsgGetText, it can be re-written as follows:
Local string &TEXTLINE = MsgGetText(0, 0, "Value of %1 is %2.", &fld1name, &fld1value);
I find that the latter is easier to read and modify compared to the first, especially if there are a lot of values being concatenated.
What about performance? Wouldn’t the MsgGetText code needlessly query the database for message (0, 0)? Fortunately, I think not. Some tests with SQL trace turned on — and the cache freshly cleared — show that a query to the message catalog for message (0, 0) is never performed by the application server. A wonderful optimization.
Sat 18 Aug 2007
A Couple of Must-have PeopleCode Coding Standards
Posted by ChiliJoe under PeopleSoft • PeopleCode • Recommendation[3] Comments
The following are a couple of I believe not well-known coding standards for PeopleCode that I strictly adhere to. These are something I don’t see most people or teams are adapting, but something I really recommend looking into for the benefits that they offer.
read more…
Sat 18 Aug 2007
When I was reading the What’s New with Batch Processing in PeopleSoft Enterprise Oracle OpenWorld presentation some time ago, the following slide caught my attention:
What are the Problems with AppEngine
- These programs can be complicated – and for a programmer they’re different
- Same logic can be used Batch and Online – Really?
- Different transactional model
- Temp table behavior is very different
- No restartability
- Easy to write a poor performing App Engine Program
- Since the introduction of PeopleCode, poor performing programs are the norm
Admittedly, I don’t have a lot of experience writing batch programs on Application Engine. But I believe the primary reason it is so easy to write poor-performing AE programs is that AE batch programs are better suited to be programmed using set processing. Set processing requires a different mind set to what procedural programmers are used to. I am new to it as well, so I find that this discussion in ITToolbox, and this followup provides valuable insights on how to perform set processing. Steve’s technique of what he calls partial cartesian joins is quite useful as well, especially for those not running an Oracle database.
Sun 29 Jul 2007
Prettify Those Code Listings
Posted by ChiliJoe under PeopleSoft • Tips & Techniques • Tools[4] Comments
I often find it neat and helpful to paste syntax-highlighted code listings to my documents and email communications. In addition to the aesthetics, the syntax highlighting allows for more readable code. Of the many powerful text editors out there, PSPad provides a feature for generating syntax-highlighted rich text.
read more…
Sat 14 Jul 2007
If you’ve been browsing my blog directly, you may have already noticed the PeopleSoft Search link on the site’s header. This is simply a Google Custom search engine pointing to sites containing relevant PeopleSoft technical content. This includes mostly forums and blogs.
I find this useful when I need to search for keywords that are not specifically related to PeopleSoft. Following is an example result when searching for “excel”:
![]()
I still have trouble filtering out RSS from the results, if anyone can help me with that.
Now, if you’re browsing my site using Firefox 2, you may also notice the following auto-discovered PeopleSoft Search item on your search bar:

Following is how the auto-discovered search would like it IE7:

This plugin is packaged using the OpenSearch standard, as described in this Mozilla article.
The plugin can also be installed by clicking the following link:
Mon 2 Jul 2007
I’ve come across the following statement on PeopleBooks (PeopleCode API Reference > Application Classes > When Would You Use Application Classes?). This statement can be found in PeopleBooks for PeopleTools versions 8.45 to 8.49:
… suppose you want to provide a more generic sort, with comparison function at the end of it. You want to use the array class Sort method, but your process has to be generic: you aren’t certain if you’re comparing two records or two strings. You could define a class that had as its main method a comparison, and return a -1, 0, or 1. Then write your personalized sort, extending the array class method Sort.
I find this statement very vague and lacking in details, that I am doubtful about its accuracy.
The statement seems to somewhat describe how one would define the ordering of objects in Java’s array and collection classes by creating an implementation of java.util.Comparator interface. However, according to PeopleBooks, the Sort method of the Array class does not have any optional parameters where such a comparator object may be provided.
I couldn’t find anything else in PeopleBooks where it describes the implementation of array sorting in the manner described in the statement above. Can anyone shed some light into this, and if possible, provide additional details? Does the PeopleCode Array class Sort method have an undocumented feature similar Java Arrays’ sort method?