Controlling data definition by application name

The simplest way to implement data definition control is to give one or more applications total control over the use of data definition statements in the subsystem.

Procedure

To control data definition by application name:

  1. Enter YES for the first option on the DSNTIPZ installation panel, as shown:
    2 CONTROL ALL APPLICATIONS ===> YES
    When you specify YES, only package collections or plans that are registered in the ART are allowed to use data definition statements.
  2. In the ART, register all package collections and plans that you will allow to issue DDL statements, and enter the value Y in the DEFAULTAPPL column for these package collections. You must supply values for the APPLIDENT, APPLIDENTTYPE, and DEFAULTAPPL columns of the ART. You can enter information in other columns for your own use.

Example

Suppose that you want all data definition language in your subsystem to be issued only through certain applications. The applications are identified by the following application plan names, collection-IDs, and patterns:
PLANA
The name of an application plan
PACKB
The collection-ID of a package
TRULY%
A pattern name for any plan name beginning with TRULY
TR%
A pattern name for any plan name beginning with TR

The following table shows the entries that you need in your ART.

Table 1. Table DSN_REGISTER_APPL for total subsystem control
APPLIDENT APPLIDENTTYPE DEFAULTAPPL
PLANA P Y
PACKB C Y
TRULY% P Y
TR% P Y

If the row with TR% for APPLIDENT contains the value Y for DEFAULTAPPL, any plan with a name beginning with TR can execute data definition language. If DEFAULTAPPL is later changed to N to disallow that use, the changed row does not prevent plans beginning with TR from using data definition language; the row merely fails to allow that specific use. In this case, the plan TRXYZ is not allowed to use data definition language. However, the plan TRULYXYZ is allowed to use data definition language, by the row with TRULY% specified for APPLIDENT.