The member versions which are to be processed by LMS are identified in the LMS statements by means of the VERSION and BASE operands. Distinctions are made between the source version, the target version and the base version of the target version.
Source version
If a member is used as the input for a function, e.g. if it is to be copied or changed, the member version is then called the source version.
The source version can be specified as follows:
composed-nameThe version specified by composed-name is the source version.
*UPPER-LIMITThis entry selects the highest possible version (represented internally by X ́FF ́).
*HIGHEST-EXISTING,BASE=*STDThis entry selects the highest existing version of the specified member name.
*HIGHEST-EXISTING,BASE=composed-name*This entry selects the highest existing version with the prefix “composed-name”.
Target version
If the member is used as the result of a function, e.g. if it is be written back, the member version is then called the target version.
The target version can be specified as follows:
*BY-SOURCEThe source version is also the target version. If *BY-SOURCE is entered and the source is not a library member, *UPPER-LIMIT will be assumed for the target version.
composed-nameThe version specified by composed-name is the target version. If ’@’ is entered, it will be rejected.
*UPPER-LIMITThis entry selects the highest version (represented internally by X ́FF ́) as the target version.
*INCREMENTSpecifies a base version according to the convention applicable to the type and the entry made for BASE. An incrementing procedure stipulated by the convention is then applied to the specified base version to determine the target version.
For the first version of a member, no base version can yet exist. In this case, the default version dependent on the convention applicable to the type is the target version.
Convention
Default version
NONE
001
STD-SEQUENCE
EXAMPLE
STD-TREE
001.001
MULTI-SEQUENCE
EXAMPLE
*HIGHEST-EXISTINGSpecifies a base version according to the convention applicable to the type and the entry made for BASE. This base version is also the target version.
For the first version of a member, no base version can yet exist. In this case, the default version dependent on the convention applicable to the type is the target version.
Base version for the target version
Except for the first version of a name, a target version is always generated for each base version. The base version fulfils several functions:
If you wish to produce a version with STORAGE-FORM=*DELTA, the base version determines which version the delta forms.
If automatic version incrementation (VERSION =*HIGHEST-EXISTING or *INCREMENT) is used to determine the target version, it takes the base version as the point of departure for calculating the target version.
In order to generate a version in a scope with active WRITE-CONTROL, a user must also hold the base version.
The base version for the target version can be specified as follows:
*STD
Depending on the VERSION entry, the existing member versions and the convention applicable to the type, a base version is specified as the default.
composed-name
The base version is specified by composed-name.
composed-name*
The base version is the highest existing version with the prefix composed-name.
Although the BASE= operand in statements has the data type <composed-name withwildcards>, no wildcard characters are permitted in the BASE= entry except for an asterisk (*) at the end to designate the entry as a prefix.
Summary
The following table provides an overview of how the target version and the base version for the target version are determined.
BASE | VERSION | Target version | Base version |
*STD | composed-name | composed-name | default base |
*INCREMENT | *INC ( default base) or | default base | |
*HIGHEST-EXISTING | default base | default base | |
composed-name1* | composed-name2 | composed-name2 | highest existing with prefix |
*INCREMENT | *INC (base version) | highest existing with prefix | |
*HIGHEST-EXISTING | highest existing with | highest existing with prefix | |
composed-name1 | composed-name2 | composed-name2 | composed-name1 |
*INCREMENT | *INC | composed-name1 | |
*HIGHEST-EXISTING | composed-name1 | composed-name1 |