DecodePCODE v0.41
The current version contains a pair of scripts, to be used from a
command line, to extract PeopleCode from either a PeopleTools project
file or directly from PeopleTools tables (direct database access is
required, with at least read-only access to about 10 PTools tables).
There is also a script to attempt three-way merging of PeopleCode,
especially useful for functional upgrades.
If a PTools project is read, .pcode files are produced exactly as they
appear in Application Designer.
Otherwise, the bytecode in the PSPCMPROG table is decoded and while this
works quite well, the .pcode files it produces are not always formatted
precisely as in AppDesigner.
The produced files can either be saved to the local file system, or
submitted to a version control system (currently, only Subversion
(SVN) is supported).
The app can also process several environments (e.g. DEV and TEST)
simultaneously, saving each environment's version of a PeopleCode object
to a separate directory or to a separate SVN branch.
DecodePCODE.bat:
Connects to a database, reads PeopleCode bytecode and SQL definitions
from the PeopleTools tables, and writes the decoded PeopleCode and the SQL
text to a subdirectory structure 'output' of the current directory.
Usage: e.g.
DecodePCODE.bat PPLTLS88CUR
(Connects to the database and uses this project definition to determine
what PeopleCode segments and SQL definitions to extract)
DecodePCODE.bat custom
(all PeopleCode/SQL with LASTUPDOPRID <> 'PPLSOFT')
DecodePCODE.bat since 2011/01/01
(LASTUPDDTTM on or after the specified day)
DecodePCODE.bat since-days 7
(same, but relative to current time)
DecodePCODE.bat since-last-time
(this reads a file 'last-time.txt' , which is created by this program
every time it runs with one of the 'since' parameters. You may want
to use this command to in a recurrent job).
DecodePCODE.bat since 2012/01/01 oprid JOHNNY
(parameter 'OPRID' can be combined with 'custom' or any of the 'since'
parameters; it adds a 'LASTUPDOPRID = ...' clause to the selects)
DecodePCODE.bat PPLTLS88CUR.xml
(Reads a PeopleTools project file, and extracts all PeopleCode segments
it contains, as well as the SQL definitions for the view-type record
definitions.
DecodePCODE_SVN.bat
This script accepts the same parameters as DecodePCODE.bat, but instead
of writing the extracted text to files, it submits it to a
Subversion (SVN) version control system. Connection parameters for
SVN should be entered in DecodePC.properties. You can specify more
than one SVN user in the properties; the program will try to map
each PeopleSoft user (LASTUPDOPRID) to an SVN user.
DecodePCODE_Merge.bat
Extracts PeopleCode from a compare report and from a PeopleTools .xml
project,and attempts to merge the three versions of each PeopleCode
segment. See 'Using DecodePCODE_Merge.pdf'.
Installation:
Extract the .zip file, and ensure a suitable JDBC library is
available in the working directory: sqljdbc.jar for MS SQL
Server, ojdbc5.jar for Oracle (retrieve from the vendor
sites; the Oracle driver may also be found in jdbc/lib under
the Oracle home). Other database types should work as well
(adjust the url and driverclass entries, and specify the .jar
file in the scripts).
If you want to commit files to Subversion, you need svnkit.jar
as well (from svnkit.com; this program has been tested with the
version included in org.tmatesoft.svn_1.3.5.standalone.zip).
See 'Setting up version control.pdf' for more details on using
Subversion with this application.
Specify the connection parameters in DecodePC.properties (for
Oracle, you may want to use tnsping to determine server
and port number).
For both .bat files, you may have to specify the path for java
(JRE 1.5+ required). You may be able to use $PS_HOME/jre/bin/java.
Installation on Unix: same, but use the .sh scripts instead of
the batch files. You will have to do a 'chmod 777 *.sh' first.
Miscellaneous:
To retrieve or browse the source code, please use the
Code > SVN links on the SourceForge project
(https://sourceforge.net/projects/decodepcode).
If you run into a bug, please submit a bug report via the Tracker
feature on the SourceForge pages.
Enjoy.
Source: README.txt, updated 2012-05-11