Identifies the database set description. Set-name must be a 1- to 16- character name. Apply the following considerations when selecting set names:
Copies the entire set description (order, mode, owner, and members) from base-set-name of another schema into the description set-name (the object of the ADD or MODIFY). Base-set-name must identify an existing set.
Identifies the schema that contains base-set-name. The base schema must have a status of VALID.
Uniquely qualifies the schema with a version number. The default is the current session option for existing versions. If the schema version that corresponds to HIGHEST or LOWEST does not contain base-set-name, the schema compiler issues an error message.
Note: Expanded syntax for version-specification is presented in the chapter “Parameter Expansions".
Specifies the logical order of adding new member record occurrences to a set occurrence at runtime.
Positions the new record immediately after the owner record, becoming the first member in the set (a LIFO stack).
Positions the new record immediately before the owner record, becoming the last member in the set (a FIFO stack). If MODE IS CHAIN is also coded, include LINKED TO PRIOR in the MODE clause.
Positions the new record immediately after the current of set.
Positions the new record immediately before the current of set. If MODE IS CHAIN is also coded, include LINKED TO PRIOR in the MODE clause.
Positions the new record according to the value of one or more of its data elements (called a sort control element) relative to the values of the same elements in other member records of the same type. ORDER IS SORTED must be specified for native VSAM sets.
Specifies the characteristic of the set that tells CA IDMS/DB how pointers are to be maintained at runtime.
Links each record in the set to the next record (establishes the NEXT pointer for the set) and is mandatory for all set types except indexed sets and native VSAM sets.
Specifies that each record in a chained set will be chained to the prior record (establishes the PRIOR pointer for the set) as well as to the next record. LINKED TO PRIOR is required if LAST or PRIOR was specified in the ORDER clause.
When using LINKED TO PRIOR and assigning pointers manually (see the OWNER and MEMBER clauses, later), be sure to code the PRIOR DBKEY POSITION clause of the OWNER and MEMBER clauses.
Identifies the set as a native VSAM set representing either a primary index on a KSDS file or an alternate index on an ESDS or KSDS file. Each VSAM set must be represented by a KSDS or PATH file in the physical database definition.
VSAM sets can have, as members, only records whose location mode is VSAM OR VSAM CALC; owner records are not specified for VSAM sets.
Identifies the set as an indexed set. This option is not valid for multiple-member sets.
Specifies the name of a symbol representing the index. The symbolic index is assigned values in a corresponding physical area definition that identify either:
Establishes the number of entries in each bottom-level index record (SR8 system record). Key-cnt must be an unsigned integer in the range 3 through 8180.
Note: For the rationale used in determining a value for key-cnt, see the Database Design Guide.
Indicates how far away from their owners the bottom level index records are to be stored. Page-cnt must be an unsigned integer in the range 0 through 32,767; 0 is the default.
Identifies the record type that owns the set; record-name must name a record associated with the current schema. This format of the OWNER clause is required for:
It is not allowed for native VSAM sets.
Identifies the positions within the owner record's prefix to be used for next and prior (if any) pointers of the set being described and optionally identifies the owner record's primary key.
The defaults for next and prior pointer positions depend on the set's mode as shown in the table under the "Usage" topic. The defaults for each set mode are:
Represents the sequential position of the NEXT set pointer within the owner record's prefix; it must be a whole integer in the range 1 through 8180.
Represents the sequential position of the PRIOR set pointer within the owner record's prefix; it must be a whole integer in the range 1 through 8180.
When assigning pointer positions manually, remember to specify a prior db-key position if either of these conditions is true:
Causes the schema compiler to automatically assign a set pointer position within the owner record's prefix when the schema description is validated. Until the schema description is validated, a DISPLAY or PUNCH of the set will indicate AUTO for pointer positions; after the schema description has been validated, DISPLAY or PUNCH indicates the sequential pointer positions that the validation resolved (see 14.8, “VALIDATE Statement").
For SQL access against a non-SQL defined database, defines a primary key field in the owner record.
Identifies a system-owned index as the primary key. To use this specification, the owner record must be a member of the named index and the named index must be a mandatory automatic set defined as duplicates not allowed. No elements named as the keys for the system-owned index can be group elements.
Identifies the primary key as the owner record's CALC key. To use this specification, the owner record must be stored with a location mode of CALC in which duplicates are not allowed. The CALC key must not contain a group element.
Removes the primary key from the set and all foreign keys associated with the primary key.
Specifies that the indexed set being described is owned by an internal owner record (SR7 system record). A single occurrence of the SR7 record type owns the set containing all member occurrences (identified in the MEMBER clause, shown next). OWNER IS SYSTEM establishes a relationship that is functionally, though not internally, the same as that of a one-of-a-kind (OOAK) record to its set members.
OWNER IS SYSTEM is not valid in the following instances:
Specifies the area in which the owner record (SR7) and the index structure is to reside. If this clause is not coded, the owner record and index structure will be stored in the same area as the member record (specified in the MEMBER clause).
Specifies the name of the area. Area-name must be the name of an area already defined as part of the current schema.
Defaults for the WITHIN AREA clause are as follows:
Names a symbol representing a page range (or subarea). Within the physical area definition, the symbolic subarea is assigned the actual range of pages in which CA IDMS/DB will store the system-owned index structure.
Specifies a relative range of pages in the physical area, in terms of either a percentage of the area or a number of pages, in which CA IDMS/DB will store the owner record and the index structure.
Determines the first page in which CA IDMS/DB will store the owner record based on the lowest page number of the area:
record lopage = (LPN + offset-page-count)
where LPN = the lowest page number in the physical area
Offset-page-count must be an integer in the range 0 through the number of pages in physical-area-name minus 1.
Determines the first page in which CA IDMS/DB will store the owner record based on the initial page range of the physical area:
record's lopage = (LPN + (INP * offset-percent * .01))
where LPN = the lowest page number in the physical area
and INP = the initial number of pages in the physical area
Offset-percent must be an integer in the range 0 through 100.
Determines the last page in which CA IDMS/DB will store the owner record based on the record's low page:
record's hipage = (RLP + page-count - 1)
where RLP = the first page in which the SR7 can be stored
The calculated page must not exceed the highest page number in the physical area.
Determines the last page in which CA IDMS/DB will store the owner record based on the record's low page and the total number of pages in the physical area:
record's hipage = (RLP + (TNP * percent * .01) - 1)
where RLP = the first page in which the SR7 can be stored
and TNP = the total number of pages in the physical area
Percent must be an integer in the range 1 through 100. The default is 100. If percent causes the calculated high page to be greater than the highest page number in the physical area, CA IDMS/DB will ignore the excessive page numbers, and will store the record occurrences up to and including the last page in the physical area.
Identifies a record type that is to participate as a member of the set. Record-name must name a record associated with the current schema. Code as many MEMBER clauses as are necessary to declare all of the set's member record types (note that indexed sets and native VSAM sets must include only one member record type).
Identifies a record type that is no longer to participate as a member of the set. Record-name must name a record type that was previously included in the set definition. Additional options of the MEMBER clause are invalid.
Specifies additional information about set members in order to maintain the set at runtime.
Causes the schema compiler to automatically assign a set pointer position within the member record's prefix when the schema description is validated. Until the schema description is validated, a DISPLAY or PUNCH of the set will indicate AUTO for pointer positions; after the schema description is validated, DISPLAY or PUNCH indicates the pointer positions that the validation resolved.
Defaults assigned by the schema compiler depend on the set mode specified for the set, as shown in the following table.
|
Mode |
Defaults |
|---|---|
|
MODE IS CHAIN |
Causes a default of NEXT DBKEY POSITION IS AUTO; the LINKED TO PRIOR clause causes a default of PRIOR DBKEY POSITION IS AUTO. |
|
MODE IS INDEX |
Causes a default of INDEX DBKEY POSITION IS AUTO. (Note that if the DBA codes NEXT or PRIOR, the schema compiler accepts the statement, but changes the specification to INDEX.) |
|
MODE IS VSAM |
Is not applicable to next and prior set pointers. |
Indicates no pointer will be maintained in the member record for the index. For a system-owned index, this means there are no index pointers in the member records. If you use this option for a system-owned index, you must also specify the MANDATORY AUTOMATIC set options.
Assigns the sequential position of the index set pointer within the member record's prefix. Index-dbkey-position must be an integer in the range 1 through 8180. The default for the index pointer position depends on the set mode as shown in the table under the "Usage" topic
When assigning pointer positions manually, remember to specify this value if the set is an indexed set.
Assigns the sequential position of the next set pointer within the member record's prefix. Next-dbkey-position must be an integer in the range 1 through 8180. The default for the next pointer position depends on the set mode as shown in the table under the "Usage" topic.
Assigns the sequential position of the prior set pointer within the member record's prefix. Prior-dbkey-position must be an integer in the range 1 through 8180. The default for the prior pointer position depends on the set mode as shown in the table under the "Usage" topic. Remember to specify this value if LINKED TO PRIOR is specified in the MODE clause.
Links each member record of the named type in the set to the owner record.
Assigns the owner pointer position manually. Owner-dbkey-position represents a relative position in the member record's prefix to be used for storing the database key of the owner record of the set; it must be an unsigned integer in the range 1 through 8180. Do not specify this clause for:
Causes the schema compiler to automatically assign the owner pointer position within the member record's prefix when the schema is validated. AUTO is the default.
Until the schema description is validated, a DISPLAY or PUNCH of the set will indicate AUTO for the pointer position; after validation, these statements will indicate the actual sequential pointer position.
For SQL access against a non-SQL defined database, identifies or removes a foreign key in the member record.
Removes a previously defined foreign key from the member record; if specified, the owner record must be defined without a primary key.
Identifies an element or a list of elements enclosed in parenthesis that identify the foreign key. The elements cannot be group elements and must match the data type and length of the corresponding element in the primary key.
Indicates that the foreign key element can contain NULL values. To use this specification, the following rules apply:
Specifies that occurrences of this record type cannot be disconnected from the set other than through an ERASE function. MANDATORY must be specified for native VSAM sets and index sets in which the index db-key position is omitted.
Specifies that occurrences of this record type can be disconnected from the set without being erased.
Note: Either MANDATORY or OPTIONAL must be specified when including a member into a set.
Specifies that occurrences of this record type are connected implicitly to the set as part of the STORE function. AUTOMATIC must be specified for native VSAM sets and index sets in which the index db-key position is omitted.
Specifies that occurrences of this record type are connected to the set only when the CONNECT function is issued.
Note: Either AUTOMATIC or MANUAL must be specified when including a member into a set.
Identifies a sorted set. This clause is required if SORTED has been specified in the ORDER statement and is invalid for other set orders.
Note: In a multiple-member set, record occurrences are maintained in order within their record type, but are maintained in no predictable order with respect to records of other types within the set.
Identifies the member record element(s) on whose values the set is to be sorted (that is, the sort control element).
Sort-element-name specifies the name of a group or elementary data item defined in an element description statement for the named member record type, with the following restrictions:
Multiple sort-element-name values (each with its own order) can be coded, forming a compound sort control element and thereby allowing the member records to be sorted on more than 1 element within the record. The element names that make up the sort control element need not be contiguous within the member record. Note, however, that the combined lengths of the elements (as defined in the PICTURE and USAGE clauses of the ELEMENT substatement) must not exceed 256 bytes. Do not code multiple sort-element-names for native VSAM sets.
For indexed sets only, specifies that the member record's database key is the set control element. Duplicates are not allowed.
Sorts the specified sort-element or database key in ascending order. ASCENDING is the default. ASCENDING must be specified for native VSAM sets.
Note that if you specify ASCENDING before the KEY keyword, you cannot specify ASCENDING or DESCENDING anywhere else in key-expression.
Sorts the specified sort-element or database key in descending order.
Note that if you specify DESCENDING before the KEY keyword, you cannot specify ASCENDING or DESCENDING anywhere else in key-expression.
Indicates that the values of the key fields will be sorted and evaluated with negative values before positive values. By default, CA IDMS/DB sorts and evaluates the key fields using a standard collating sequence, which sorts information according to its hexadecimal representation.
Even if NATURAL SEQUENCE is specified, the schema compiler may use a standard sort sequence if an element in the sort key is a group element. If the data types of the elements subordinate to the group do not affect the natural sort sequence, CA IDMS/DB uses the natural sequence. Otherwise, it uses the standard sort sequence and issues a warning message.
Note: If STANDARD SEQUENCE is assumed and the CONTROL FIELDS will allow NATURAL SEQUENCE, NATURAL SEQUENCE will be selected. Control fields that are display will be set to NATURAL SEQUENCE.
Applies to sorted indexed sets only and specifies that similar index entries will be maintained in their entirety.
Applies to sorted indexed sets only and specifies that similar index entries will be maintained in compressed form. COMPRESSED saves index space by compressing repeated characters and by causing like index entries to be stored in part: the initial like portion of the entry is stored once for all similar entries and only the different remaining portions are stored for each entry.
Specifies how CA IDMS/DB handles a record occurrence whose sort key duplicates an existing occurrence's sort key.
Logically positions record occurrences before the occurrence(s) with the duplicated sort key. FIRST is not valid for native VSAM sets.
Logically positions record occurrences after the occurrence(s) with the duplicated sort key. LAST is not valid for native VSAM sets.
Does not allow record occurrences with duplicate sort keys.
For native VSAM only, retrieves record occurrences in the order in which they were stored, regardless of the direction in which the set is being searched.
For MODE IS INDEX sets only, sorts record occurrences with duplicate key values by db-key.
Displays or punches the entire set description.
Displays or punches the entire set description.
Displays or punches only the set name.
|
Copyright © 2014 CA.
All rights reserved.
|
|