Previous Topic: NAME ClauseNext Topic: Additional Qualifiers


VERSION Clause

IDD supports the use of version numbers to accommodate entity occurrences that are identically named but different in usage or format. For example, when designing and testing a new application, the user can maintain several occurrences of the same entity by assigning a unique version number to each occurrence. When the final definition is approved, the user can retain the appropriate version in the dictionary, deleting all other versions.

Note: DDDL syntax does not support version number identification for the CLASS, ATTRIBUTE, ENTRY POINT, MESSAGE, USER, and user-defined entity types.

The VERSION clause permits the user to specify an explicit version number or the next higher or lower number. The user can also specify default version numbers for the current session or dictionary by using the SET OPTIONS DEFAULT FOR NEW VERSION and SET OPTIONS DEFAULT FOR EXISTING VERSION statements (see SET OPTIONS Syntax).

If a version number is not specified within an entity-type statement, the version number conventions described in Default Version Number Conventions, apply.

Syntax: VERSION Clause

►►─── Version is ──┬─ version-number ───────┬─────────────────────────────────►◄
                   └┬────────┬┬─ HIGhest ─┬─┘
                    └─ NEXt ─┘└─ LOWest ──┘

Parameters

Version is version-number

Specifies a unique integer in the range 1 through 9999.

NEXt

When added to HIGHEST (NEXT HIGHEST), specifies the highest version number associated with the entity occurrence, plus 1. When added to LOWEST (NEXT LOWEST), specifies the lowest version number associated with the entity occurrence, minus 1. If only NEXT is specified, NEXT HIGHEST is assumed. This parameter is used only with the ADD statement or with the NEW NAME or NEW VERSION clauses.

HIGhest

Specifies the highest version number associated with the object entity occurrence. If NEXT HIGHEST is specified and the object entity occurrence does not exist in the dictionary, the DDDL compiler assigns a version number of 1.

LOWest

Specifies the lowest version number associated with the object entity occurrence. If NEXT LOWEST is specified and the object entity occurrence does not exist in the dictionary, the DDDL compiler assigns a version number of 9999.

Examples

Assuming that versions 3, 8, 9, 11, and 23 of element ACCT-NUMBER exist in the dictionary, this statement implicitly requests version 23.

modify element account-number
     version is highest.

Assuming that versions 420, 440, and 460 of record EMP-NAME exist in the dictionary, this statement implicitly assigns version 461.

add record emp-name
     version is next highest.