ADD SCOPE command


The ADD SCOPE command adds scope rules to outbound migrate profiles or catalog baseline profiles.

An ADD SCOPE command used with the CREATE, REPLACE, or ADD SCOPE command does not require a profile name. If the ADD SCOPE command does not include a profile name, the command uses the profile name specified in the preceding CREATE, REPLACE, or ADD SCOPE command. The ADD SCOPE command cannot use the profile name specified in a DELETE command.

An ADD SCOPE command by itself, without a CREATE or REPLACE command, requires you to specify a profile name. If the ADD SCOPE command includes a profile name, the profile name must already exist and not as part of an earlier CREATE or REPLACE command.

You can use the ADD SCOPE command in the batch profile JCL. 

Syntax diagram of the ADD SCOPE command

BatchProfile_addScopeKeyword_SPE2210.png

Variable

Description

profileType

This variable defines the type of profile to which you want to add scope rules. Valid values are as follows:

Value

Description

MIGRATE

Migrate profile

BASELINE

Baseline profile

profileOwner.profileName

This variable defines the name of the migrate or baseline profile to which you want to add a scope rule.

option

This variable defines whether data structures defined in the scope rule are included or excluded from the migration or baseline. INCLUDE is the only valid value for this option in the batch profile process. If you do not specify an option, the batch profile process defaults to INCLUDE.

objectType

This variable defines the type of data structure that you want to include in the migration or baseline. Valid values are as follows:

Value

Description

SG

Storage Group

DB

Database

TS

Table Space

TB

Table

CK

Check

FK

Foreign Key

IX

Index

UC

Unique Constraint

VW

View

TR

Trigger

SY

Synonym

AL

Alias

SQ

Sequence

SP

Stored Procedure

RP

Row Permission

MK

Column Mask

objectName

This variable defines relevant first, second, and third parts of the name of the data structure. Wildcards are allowed.

migOptions

This variable defines the dependent objects that you want to include in the migration or baseline. Valid values are as follows:

Value

Description

MIGALL

All dependent objects

MIGDATA

Data for the object types Database, Tablespace, or Table

MIGDB

Databases for the object type Table

MIGTS

Table spaces for the object type Database or Table

MIGTB

Tables for the object types Database or Tablespace

MIGCK

Check constraints for the object types Database, Tablespace, or Table

MIGFK

Foreign keys for the object types Database, Tablespace, or Table

MIGIX

Indexes for the object types Database, Tablespace, or Table

MIGUC

Unique and primary key constraints for object types Database, Tablespace, or Table

MIGVW

Views for the object types Database, Tablespace, Table, or View

MIGAU

Authorizations for the object types Storage Group, Database, Tablespace, Table, View, Sequence, or Stored Procedure

MIGTR

Triggers for the object types Database, Tablespace, Table, or View

MIGSY

Synonyms for the object types Database, Tablespace, Table, or View

MIGAL

Aliases for the object types Database, Tablespace, Table, or View

MIGAUX

Auxiliary objects associated with any LOB base table for the object types Database, Tablespace, or Table

MIGRP

Row permissions for the object types Database, Tablespace, or Table

MIGMK

Column masks for the object types Database, Tablespace, or Table

Examples

The following examples illustrate the use of the ADD SCOPE command:

Examples

The following implicit command creates a scope rule for all dependents of the table space TS1.TS2 in a new profile:

CREATE MIGRATE PROFILE MVSAMA.MPTEST1
ADD SCOPE TS TS1.TS2 MIGALL

The following explicit command creates a scope rule for an existing baseline profile: 

ADD SCOPE BASELINE PROFILE MVSAMA.BPTEST1 TB TB1.TB2 MIGALL

The following explicit and implicit commands create scope rules for an existing migrate profile: 

ADD SCOPE MIGRATE PROFILE MVSAMA.MPTEST2 INCLUDE DB DBNAME1 MIGDATA
ADD SCOPE INCLUDE TS DBNAME.TS3 MIGALL

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*