Copy PeopleSoft File Attachments

I was doing some work with file attachments in PeopleSoft over the past couple of weeks and I have to say PeopleSoft’s ability to handle attachments is flat out bad.  However, it does work.  The client I was working with found that storing documents in the database was starting to consume an extreme amount of space which made the database have issues.

In PeopleTools 8.54 there is a batch copy attachment feature that lets you move attachments from one URL to another.  So you can define a URL for sftp and another for the database record and copy attachments to/from those URLs. In 8.53 there is just an online page for this, however, if you are doing a copy of more than about 1000 documents you will want to switch to a batch mode.

I was also fascinated with the orphan cleanup process that looks at the referencing record and the storage record and clears out any non-referenced storage record documents.  PeopleSoft does this by looking for the FILE_ATTACH_SBR subrecord in the record definitions and generates a list of attached file names and then compares that to the records associated with FILE_ATTDET_SBR subrecord.  This process cleared out about 25,000 documents that were not referenced.

When doing the actual copy from the database to the sftp (which was local), I did it in chunks by identifying the correct reference record and specifying that in the file record array for the copyattachment function.  As I had one record that had almost 200,000 documents, which if you don’t specify the reference records it will look at all the records with the FILE_ATTACH_SBR subrecord which in the Finance 9.2 environment I am in was 108 records, however only 8 had references.

I also built an index for the record with the actual document which was unique on the fields:  ATTACHSYSFILENAME, VERSION, FILE_SEQ, which is different then the delivered index thus allowing the look up to be much more efficient.

ENCRYPT_PASSWORD Fails with JVM Error

When building environments with PeopleTools 8.53 & 8.54 everything will be going along tickety boo and it will go to encrypt the passwords and bam:

Error: Process aborted. Possibly due to JVM is not available or missing java class or empty password.

Well, isn’t that interesting.  The PeopleTools 8.53 and 8.54 have a new SALT component to its passwords and clearly uses the Java to do the encryption.  Add %PS_HOME%\jre\bin to the beginning of the PATH variable and re-run data mover and try the encryption of the passwords again.

COBOL: Error Running Test – PTPDBTST

When running the Simple Connection Test Cobol you may encounter an error such as:

SUCCESSFUL DATABASE CONNECT AND DISCONNECT
PTPSQLRT – ERROR IN BIND SETUP/DATA
STATEMENT=PTPUSTAT_U_PRCRQSE
VARIABLE#=001
DATA TYPE=001
DATA LEN =00001
SCALE =000

Application Program Failed
Action Type : SQL UPDATE
In Pgm Section : SQLRT: PROCESS-SETUP(BIND)
With Return Code: 08001
Error Message : Invalid bind variable number
Stored Stmt : PTPUSTAT_U_PRCRQSE
SQL Statement : UPDATE PSPRCSRQST SET RUNSTATUS = :1 ,PRCSRTNCD = :2 ,ENDDTT
M = SYSDATE ,LASTUPDDTTM = SYSDATE ,CONTINUEJOB = :3 WHERE P
RCSINSTANCE = :4

at pos 00028

PTPSQLRT – Error Encountered
No longer have connection to DB due to an error from previous
action: SQL UPDATE. Bypassing current action: SQL SELECT.
Terminating Program.

Interestingly, your gut should be saying you have the wrong PeopleTools COBOL being ran, and you’d be right.  In my case I had all the compiles done correctly, but I was working in a decoupled home environment, but the source for the application came from an old system where the Application home still had the COBOL source combined with application and tools code.  Once I removed the PT* cobols from the source and recompiled and moved the files around correctly, everything worked like a charm!

Crystal: 8.54 – 64bit Questions

Over the past several days I have been configuring multiple systems with multiple Peopletools versions and I think my mind snapped somewhere.  This 32/64 bit thing is so frustrating.  Basically 8.54 is almost completely 64 bit, but 8.53 is still a 50/50 chance.  When it comes to Crystal with 8.54 you need to make sure you use the 64 bit run time library where as 8.53 and down use the 32 bit run time.  However if you have the full install of crystal so that you can develop reports, you need to put the CrystalExePath to the the full install win32_x86 32 bit directory.

I found this absolutely helpful case on Support:  1540788.1:

PeopleSoft PeopleTools 8.53+ uses the SAP Crystal Reports runtime engine for .NET Framework 4, (Crystal Reports version for Visual Studio 2010), as the runtime for running SAP Crystal Reports. This must be downloaded from the SAP website. Link

Download the Runtime:  PeopleTools 8.53 – 32bit and PeopleTools 8.54 – 64 bit.

When configuring the process scheduler set the CrystalEXEPath to:

8.53:  CrystalEXEPath = C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86

8.54:  CrystalEXEPath = C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win64_x64

If you have Crystal Reports 2008 installed as well as the runtime set the CrystalEXEPath to:

CrystalEXEPath = C:\Program Files (x86)\Business Objects\BusinessObjects Enterprise 12.0\win32_x86

Note:  This are the default install paths and maybe different depending on how you installed them.