Examples of Using the Defaults Specification

The following examples illustrate the use of the defaults specification.

Example 1

In this example, the location of all database files is given as the pack family DBPACK.

DEFAULTS (PACK = DBPACK);

Example 2

The DEFAULTS statement in this example designates the following:

  • A checksum for each data set

  • The location of the audit trail, control file, and guard files as the pack family DISK

  • The location of data sets as the pack family DBDATA

  • The location of sets and subsets as the pack family DBSET

DEFAULTS
 (
  CHECKSUM,
  DATA SET (PACK = DBDATA),
  SET      (PACK = DBSET)
 );

Example 3

In the following DEFAULTS statement, alpha items are initialized to BLANKS, and numeric items are initialized to zero:

DEFAULTS
 (
  ALPHA (INITIALVALUE IS BLANKS),
  NUMBER (INITIALVALUE IS 0)
 );

Example 4

In this example, the structures are assigned to family packs as follows:

Structure

Family

D

DBDATA

E

DISK

S

DBSET

T

DBPACK

DEFAULTS
 (
  PACK = DBPACK,
  DATA SET(PACK = DBDATA)
 );
D DATA SET
 (
  KD ALPHA(3);
 );
E DATA SET
 (
  KE NUMBER(3);
 ) DISK;
S SET OF D KEY KD;
T SET OF E KEY KE;
S (PACK = DBSET);

Example 5

Based on the assignments made in this example definition, if a new record is added using remap R, the items are initialized with the following values:

Item

Initial Value

A

"RRR"

B

"DDD"

C

"      "

When a new record is added using data set D, the items are initialized as follows:

Item

Initial Value

A

"DDD"

B

"DDD"

C

"      "

DEFAULTS
 (
  ALPHA (INITIALVALUE IS BLANKS)
 );
D DATA SET
 (
  A     ALPHA(3) INITIALVALUE "DDD";
  B     ALPHA(3) INITIALVALUE "DDD";
  C     ALPHA(3);
 );
R REMAPS D
 (
  A     ALPHA(3) INITIALVALUE "RRR";
  B     ALPHA(3);
  C     ALPHA(3);
 );

Example 6

This example illustrates the use of the CCSVERSION option.

DEFAULTS(PACK=SYS39,
   CHECKSUM,
   CCSVERSION = FRANCE,
   DATA SET (LOCK TO MODIFY DETAILS = TRUE,
   EXTENDED = TRUE));