Wednesday, March 5, 2008

Decode Peoplecode - decodepc.java

decodePC.sqr as written by David L. Price has been rewritten to decodePC.java and expanded. It's general purpose is decoding PeopleCode stored as BLOB. The PeopleSoft database is accessed via a JDBC connection therefore there is no need to use Application Designer to look at PeopleCode, Application Engine programs, SQL, and XSLT. decodePC.java can read Application Engine programs and Application Packages and output them to a text file so you can get on with solving business problems.

Example of compiling decodePC.java with Oracle JDBC on a Unix box from a command prompt in the directory where decodePC.java exists:

javac -classpath /directorypath/ojdbc14.jar ./decodePC.java

Example of running decodePC.class with Oracle JDBC on a Unix box from a command prompt in the directory where decodePC.class exists:

java -classpath .:/directorypath/ojdbc14.jar decodePC

Download the code here from the site!

2 comments:

kane81 said...

when ever I run this, it crashes on the following line


/AP = XXXX

with

#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x62f0c9a7, pid=3916, tid=5856
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_11-b03 mixed mode)
# Problematic frame:
# C [ocijdbc10.dll+0xc9a7]
#

Asgar said...

Hi,

I am using decodePC.java to decode poeplecode, it is not decoding the numbers properly.
I checked with the above peoplecode..

If None( ENTRY_REASN_TBL.DESCRSHORT) Then
ENTRY_REASN_TBL.DESCRSHORT = Substring( ENTRY_REASN_TBL.DESCR, 1, 10);
End-If

The result that I got is..

If None( ENTRY_REASN_TBL.DESCRSHORT) Then
ENTRY_REASN_TBL.DESCRSHORT = Substring( ENTRY_REASN_TBL.DESCR, 65536, 655360);
End-If

please anybody check it out and tell me what to do..

Regards,
Asgar