|Exporting PeopleCode as Text||KEVIN RESCHENBERG|
Many PeopleSoft developers would like to be able to save PeopleCode as a text file
so they can use comparison tools or other automated processes to scan it.
This is simple, of course: Just copy the PeopleCode from App Designer and paste it into
a text file. But that works with only one program and it requires you to
open each program separately. Can you export all of the PeopleCode from a project,
or even all of the PeopleCode from an entire PeopleSoft database?
Since PeopleCode is stored in the database, it should be possible to read
it with SQL—but unfortunately (as I mentioned in a previous posting:
PeopleCode, Behind the Scenes),
the code has been compressed into an intermediate "p-code" format that
is unreadable. However, there is a trick that can be used to export
large numbers of PeopleCode programs into a text file:
In App Designer, go to Edit | Find In...
In the "Find What" box, type a semicolon (;).
Make the appropriate selections in the "Find Type" and "Project" fields.
Check the "Save PeopleCode to File" box.
Hit the Find button.
Enter a file name when prompted.
This should give you a
text file conveniently formatted with the name of the program before each listing.
There is one small difficulty with this that you need to know about if you
are trying to export large numbers of PeopleCode programs. The semicolon character
that we are searching for will appear in almost all programs, but this
method would miss the following "program":
/* Deleted */
This program is functionally equivalent to a missing program. Note that
these "empty" programs could consist of large blocks of comments that
contain no semicolons. Whether you
need to export these depends on what you are trying to do. If you need
these, search on both a semicolon and a
forward slash (/),