I think people use semi-colon for their search because they think every piece of PeopleCode must have one. This in fact is wrong. Here is a 30 line piece of Record FieldChange PeopleCode that will save and compile using PeopleTools 8.54.13. (Granted - it is non-sensical. But I'm just proving the point that not all PeopleCode must have a semi-colon.)
This PeopleCode program makes use of a wide variety of built-in functions and language constructs, such as:
- If, Else, End-If
- Evaluate, When, When-Other, End-Evaluate
- Upper, Lower, String
- Abs, Max, AccruableDays
- %Date
- For, End-For, Exit
- Try, Throw, Catch, End-Try
- CreateJavaObject, CreateException
- Error, MsgGet
- RECORD.FIELD notation
/* Comment of course */ Evaluate PSOPRDEFN.OPRID When = "VP1" If PSOPRDEFN.OPRID = Upper("cc") And "y" <> "z" Then If ("a" = "B") Then While 1 = 1 PSOPRDEFN.OPRID = Lower("AA") End-While End-If End-If <* Comments too *> When = "PS" If Abs(1.0) = Max(AccruableDays(%Date, %Date, 0)) Then Return End-If When-Other For &intCounter = 1 To PSOPRDEFN.FAILEDLOGINS try If &intCounter = Round(100.12912, 0) Or String(&intCounter) = CreateJavaObject("String", "Hello").concat(" World") Then Exit Else throw CreateException(2, 160, "'%1' doesn't support property or method '%2'", "SomeClass", "SomeMethod") End-If catch Exception &exc Error MsgGet(0, 0, "hello world!") end-try End-For End-Evaluate