Month: November 2009

a long overdue thank you

The past year has been well, many words come to mind but let’s go with challenging. It’s also been interesting, frustrating, enlightening, exhausting, but right about now, it feels like it was a very, very good year. Those of you that have read through the previous posts will remember that, right around the time I left for the Miracle Oracle Open World conference in October of 2008, I was

a long overdue thank you

The past year has been well, many words come to mind but let’s go with challenging. It’s also been interesting, frustrating, enlightening, exhausting, but right about now, it feels like it was a very, very good year. Those of you that have read through the previous posts will remember that, right around the time I left for the Miracle Oracle Open World conference in October of 2008, I was

managing geeks

I read through several posts that I had saved as drafts today. Some were close to done but are no longer relevant. Others were nothing more than a sentence or a link, and now I don’t recall where I intended to take the story. I had saved only the link for this one and it’s non-technical, but I liked the article and considering some of the churning over MOS, it seemed appropriate. (Draw your

managing geeks

I read through several posts that I had saved as drafts today. Some were close to done but are no longer relevant. Others were nothing more than a sentence or a link, and now I don’t recall where I intended to take the story. I had saved only the link for this one and it’s non-technical, but I liked the article and considering some of the churning over MOS, it seemed appropriate. (Draw your

MOS, Flash, benefit enrollment and purple crayons …

Nuno’s post today coincided with an email I received from Oracle Support, expressing a sentiment similar to that in the email Nuno received from KEH. I won’t attempt to post the entire email from Oracle Support, as it’s full of pictures and links, but here’s the ‘thank you for your patience’ section:Thank you for your patience during this transition period. We recognize that some customers

MOS, Flash, benefit enrollment and purple crayons …

Nuno’s post today coincided with an email I received from Oracle Support, expressing a sentiment similar to that in the email Nuno received from KEH. I won’t attempt to post the entire email from Oracle Support, as it’s full of pictures and links, but here’s the ‘thank you for your patience’ section:Thank you for your patience during this transition period. We recognize that some customers

Vive la diference!

And I’m not talking about the one between Mars and Venus!Some of the regular readers will no doubt recall my comments regarding the MOS introduction.Yes, dang right they were strong words! We pay Oracle YEARLY in excess of 6 figures in maintenance fe…

Vive la diference!

And I’m not talking about the one between Mars and Venus!Some of the regular readers will no doubt recall my comments regarding the MOS introduction.Yes, dang right they were strong words! We pay Oracle YEARLY in excess of 6 figures in maintenance fe…

Controlling How PeopleSoft Cobol Collects Statistics

In previous postings, I have proposed locking statistics on temporary working storage tables and changing the DDL model for %UpdateStats to call my own PL/SQL Package.  That works for Application Engine programs, but PeopleSoft COBOL can also update object statistics, and they use a different mechanism.

In the case of the Global Payroll calculation engine, GPPDPRUN, the run control component has a secondary page with a check box to enable statistics collection during the process.

However, to get streamed processing in Payroll (where the population of employees is broken into ranges of employee IDs that are each processed by a different concurrent process) to work effectively I change the working storage tables to be Global Temporary Tables, and then because the different physical instances would still share statistics (Global Temporary Tables Share Statistics Across Sessions) I delete and lock the statistics on these tables.

If the payroll calculation is run with the Update Statistics option it generates the following error.

Application Program Failed
Action Type : SQL UPDATE
In Pgm Section : SQLRT: EXECUTE-STMT
With Return Code: 38029
Error Message : ORA-38029: object statistics are locked
Stored Stmt : GPPSERVC_U_STATS
SQL Statement : ANALYZE TABLE PS_GP_PYE_STAT_WRK ESTIMATE STATISTICS

COBOL issued an ANALYZE command, and did not use the DDL model defined in the table PSDDLMODEL.  However, the command came from a stored statement, in this case GPPSERVC_U_STATS.  The stored statement is defined as follows in the gppservc.dms.

STORE GPPSERVC_U_STATS
%UPDATESTATS(PS_GP_PYE_STAT_WRK)
;

So, the expansion of %UPDATESTATS in the stored statement to the ANALYZE command is hard coded somewhere in the delivered executable code.  I would not suggest attempting to change that. 

However, it is perfectly possible to change the stored statement to call the wrapper package (www.go-faster.co.uk/scripts/wrapper848meta.sql).

STORE GPPSERVC_U_STATS
BEGIN wrapper.ps_stats(p_ownname=>user, p_tabname=>'PS_GP_PYE_STAT_WRK'); END;;

In all there are 5 statements in HR 9.0 that call %UPDATESTATS that all relate to GPPDPRUN.  I generated a data mover script to replace them with calls to my replacement package using the following SQL.script.

set head off feedback off long 5000
spool updatestats_after.dms
select 'STORE '||pgm_name||'_'||stmt_type||'_'||stmt_name
||CHR(10)
||'BEGIN wrapper.ps_stats(p_ownname=>user,p_tabname=>'''
||substr(stmt_text
, INSTR(stmt_text,'(')+1
, INSTR(stmt_text,')')-INSTR(stmt_text,'(')-1
)
||'''); END;;'
from ps_sqlstmt_tbl
where stmt_text like '%UPDATESTATS(%'
/
spool off

I have only tested this against HR9.0. Note that long columns such as PS_SQLSTMT_TBL.STMT_TEXT only become CLOBs when the application version reaches 9.0.   You cannot use the LIKE operation on the long column.

TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569