Syntax and options of the CATMAINT control statement
The CATMAINT utility control statement, with its multiple options, defines the function that the utility job performs.
Use the ISPF/PDF edit function to create a control statement and to save it in a sequential or partitioned data set. When you create the JCL for running the job, use the SYSIN DD statement to specify the name of the data set that contains the utility control statement.
Syntax diagram
>>-CATMAINT--UPDATE---------------------------------------------> >--+-------------------------------------------------+----------> | .-------------------------------------. | | V | | +-SCHEMA----SWITCH(schema-name,new-schema-name)-+-+ | .-,----------. | | V | | '-OWNER--FROM--(----owner-name-+--)--TO ROLE------' >--+-------------------------------------------+--------------->< | .---------------------------------. | | V | | '-VCAT----SWITCH(vcat-name,new-vcat-name)-+-'
Option descriptions
- UPDATE
- Indicates that you want to update the catalog. Run this option only when you migrate to a new release of DB2® or when IBM® Software Support instructs you to do so.
- SCHEMA SWITCH(schema-name,new-schema-name)
- Changes
the owner, creator, and schema of database objects. The schema is
not changed for views, materialized query tables, SQL scalar function,
triggers, and native SQL procedures. The authorization IDs of the
creator or owner for plans and packages that use the objects are not
changed.
schema-name is a string that identifies the existing owner, creator, or schema to be changed. It will be ignored if it does not identify any owner, creator, or schema names.
schema-name cannot identify a schema or qualifier of an object on which any of the following objects depend:
- Triggers
- Views
- SQL functions
- Materialized query tables
- Native SQL procedures
- Expression-based indexes
- Column masks
- Row permissions
schema-name cannot be referenced in a check condition in any check constraints. Ownership of objects will not be changed if the owner is a role.
new-schema-name specifies the new name for the owner, creator, or schema. The name cannot be a schema that qualifies existing objects.
- OWNER FROM(owner-name) TO ROLE
- Changes the ownership of objects from a user to a role. A trusted
context must have been created for INSTALL SYSADM before CATMAINT
UPDATE OWNER can run. The authorization IDs of the creator or owner
for plans and packages that use the objects are not changed.
owner-name specifies the current owner of the object. You can specify multiple owners.
- VCAT SWITCH(vcat-name,new-vcat-name)
- Changes the catalog name that is used by storage groups, user
indexes, and table spaces.
vcat-name identifies the integrated catalog facility catalog that is currently used by user-managed data sets for indexes, table spaces, and storage groups.
new-vcat-name specifies the new integrated catalog facility catalog that is to be used by user-managed data sets for indexes, table spaces, and storage groups.
To specify any non-alphanumeric characters, enclose each name in single quotes.