Creating views of functions
This procedure explains how to create a view of a function on SYSIBM.SYSROUTINES to enable other people to administer their own functions.
Procedure
-
On the DB2 Administration Menu (ADB2) panel, specify
Z, and press Enter.
The System Administration (ADB2Z) panel is displayed.
-
Specify option FM, and press Enter.
The Manage Functions (ADB2ZF) panel is displayed, as shown in the following figure.
Figure 1. Manage Functions (ADB2ZF) panel DB2 Admin -------------------- DD1A Manage Functions -------------------- 09:53 Option ===> DB2 System: DD1A 1 - Display/alter functions DB2 SQL ID: ADM001 2 - Create functions 3 - Display function statistics 4 - Start all functions 5 - Stop all functions 6 - Create view on SYSIBM.SYSROUTINES 7 - Display views on SYSIBM.SYSROUTINES Catalog table/view for option 1: Owner ===> SYSIBM (default is SYSIBM) Name ===> SYSROUTINES (default is SYSROUTINES) User defined functions can also be managed from option 1.F F1=HELP F2=SPLIT F3=END F4=RETURN F5=RFIND F6=RCHANGE F7=UP F8=DOWN F9=SWAP F10=LEFT F11=RIGHT F12=RETRIEVE
-
Specify option 6, and press Enter.
The Create View on SYSIBM.SYSROUTINES (ADB2ZF6) panel is displayed, as shown in the following figure. On this panel, you can define a view for all procedures with the (LIKE) pattern you define.
Figure 2. Create View on SYSIBM.SYSROUTINES (ADB2ZF6) panel DB2 Admin ----------- DB2X Create View on SYSIBM.SYSROUTINES ------------ 18:39 Command ===> CREATE VIEW Owner ===> > Name ===> > AS SELECT * FROM SYSIBM.SYSROUTINES WHERE SCHEMA LIKE ' Pattern ===> > ' WITH CHECK OPTION ; GRANT SELECT,INSERT,UPDATE,DELETE ON (above table) TO Grantees ===> -
Complete the fields on this panel to create a view, for example, Define view
ABC.FUNCTIONS as a view on SYSIBM.SYSROUTINES WHERE SCHEMA LIKE 'ABC.
View ABC.FUNCTIONS contain all user-defined functions in schemas starting with ABC. You can issue GRANT SELECT, INSERT, UPDATE, or DELETE statements on the view to a list of authorization IDs (grantees).