Ever wonder when was a stored procedure last used/invoked in DB2 LUW? Knowing this may be helpful in determining whether a stored procedure is still in use or how recently it was used. Run this query to find this information.
SELECT PR.PROCSCHEMA
,PR.PROCNAME
,PK.LASTUSED
FROM SYSCAT.PROCEDURES PR
,SYSCAT.ROUTINEDEP RD
,SYSCAT.PACKAGES PK
WHERE PR.SPECIFICNAME = RD.ROUTINENAME
AND RD.BNAME = PK.PKGNAME
AND PR.PROCSCHEMA <> 'SYSIBMADM'
AND PK.LASTUSED > '01/01/0001'
ORDER BY PK.LASTUSED DESC
WITH UR;
Remember that, you can use this query only from DB2 LUW V9.7 onwards.
Technical Tips including DB2 z/OS, DB2 LUW, COBOL, JCL, VSAM, CICS, 3rd party vendor tools (BMC, CA, IBM, Macro4, etc.)
Showing posts with label Stored Procedure. Show all posts
Showing posts with label Stored Procedure. Show all posts
Friday, September 27, 2013
Monday, December 1, 2008
CA Intertest (Batch) Tips
If you use CA's Intertest for Batch to debug your batch COBOL programs or stored procedures, read on.
There are a few commands that you use frequently. Set them commands in PFKEYS for ease of use:
STEP 1 - Set steps to go in each run to 1 (I usually set it to PF4)
GO - Run as many steps as described in the STEP command (I usually set it to PF5)
RUN - Run until the next breakpoint (I usually set it to PF6)
KUP - Scroll Up in the Data Display Window (I usually set it to PF17)
KDOWN - Scroll Down in the Data Display Window (I usually set it to PF18)
There are a few commands that you use frequently. Set them commands in PFKEYS for ease of use:
STEP 1 - Set steps to go in each run to 1 (I usually set it to PF4)
GO - Run as many steps as described in the STEP command (I usually set it to PF5)
RUN - Run until the next breakpoint (I usually set it to PF6)
KUP - Scroll Up in the Data Display Window (I usually set it to PF17)
KDOWN - Scroll Down in the Data Display Window (I usually set it to PF18)
Labels:
CA,
COBOL,
Computer Associates,
Mainframe,
Stored Procedure
Subscribe to:
Posts (Atom)