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!