CURRENTDATA for Package BIND (fudged column DEFERPREP) Db2 z

Michael Hannan

CURRENTDATA for Package BIND (fudged column DEFERPREP) Db2 z

Here is a quote from an IBM Redbook "Packages Revisited":

"Example: A-21 CURRENTDATA usage for packages

SELECT
CASE(DEFERPREP)
WHEN 'A' THEN 'A-CURRENTDATA-YES-ALL-CURSORS'
WHEN 'B' THEN 'B-CURRENTDATA-NO -AMBIGUOUS-CURSOR'
WHEN 'C' THEN 'C-CURRENTDATA-YES-AMBIGUOUS-CURSOR'
WHEN ' ' THEN 'D-PRE-CURRENTDATA'
END AS USAGE
,ISOLATION
,COUNT(*) AS NUMBER_OF_PACKAGES
FROM SYSIBM.SYSPACKAGE
WHERE DEFERPREP IN ('A','B','C',' ')
GROUP BY DEFERPREP,ISOLATION
WITH UR;

For local packages, CURRENTDATA only applies if the package is bound with CS. For remote packages, CURRENTDATA applies with RR, RS and CS."

Now for my question. I asked some colleagues by mail and got no answer. So maybe it's not so easy?

How are the 3 values above, A, B and C obtained? O.K. I am very used to receiving value 'B' for Packages bound with CURRENTDATA(NO), but I thought CURRENTDATA(YES) probably produced value 'A'.

How does value 'C' come about? Is it abnormal? I thought I don't normally see that unless Alzheimer's is setting in. Does CURRENTDATA(YES) with ISOL(CS) and non-remote Package normal produce value 'A' or value 'C'?

Michael Hannan,
DB2 Application Performance Specialist
CPT Global Ltd

 

Edited By:
Michael Hannan[Organization Members] @ Feb 07, 2018 - 11:49 AM (Europe/Berlin)
Michael Hannan[Organization Members] @ Feb 07, 2018 - 11:53 AM (Europe/Berlin)