How it works: Multiple versions of a resource definition
As your business applications progress from development through testing and into production, the resources that support them may evolve as well. Since resources that are defined to CICSPlex® SM exist independent of groups or other objects, versioning is necessary to support variations in resource definitions.
- A single version of a resource definition in multiple groups
- Multiple versions of the resource throughout the CICSplex
For example, you can have three DB2TDEF definitions, each called DB2TR01, and each specifying a different (or the same) transaction IDs, each having a different version number.
Business Application Services can manage up to 15 versions of the same resource definition, each specifying the same or a different CICS® resource.
The version number is assigned to the resource definition when the definition is stored in the CICSPlex SM data repository.
CICSPlex SM ensures that the version number is unique for the resource type of the definition.
How the multiple versions of a resource definition are assigned or managed
When you create a resource definition, you can specify a version number for the definition or let BAS assign an available version number. CICSPlex SM does not generate a new version when you update an existing resource definition. CICSPlex SM does not allow multiple versions of the same resource definition to be installed in a CICS system.
When you create resource definitions using the batched repository-update facility, or the application programming interface (API), you can use the DEFVER keyword to specify the version number of a new definition. The version number is an integer in the range 1 through 15.
If no version (DEFVER) is specified on the create of a CICS resource definition in BAS, it uses the default (0), as documented in the resource table. This means that CICSPlex SM assigns the first available version number in the range 1-15. When all 1 through 15 are used, the create operation fails because it is not possible to create a new resource.
Practical advice for implementing multiple versions of a resource definition
You can use version numbers to help identify a specific variant of a resource definition, providing you have a policy of using version numbers for that purpose. Otherwise, if you remove certain versions of a resource definition and then define new ones, the version number alone may not indicate the most recent version.
For example, suppose you define 15 versions of a resource definition (numbered 1 to 15) and then remove versions 3 and 12. The next time you create a new version of that resource definition, if you do not specify a version number, CICSPlex SM reuses the available version numbers from low to high. So, in this example, the latest version of the resource definition might be version 3.
For this reason, the version number alone might not be sufficient to identify the latest version of a resource definition. To enable you to do that, CICSPlex SM performs time-stamping, which provides a chronological record of the versions of a resource definition. The date and time at which a given version of a resource definition was created and last updated are maintained by CICSPlex SM in the CREATETIME and CHANGETIME attributes of the appropriate resource table. These values are recorded by using the time zone of the maintenance point CMAS, not the time zone of the user who created or changed the definition. In addition, the values are fixed at the time they are recorded; they are not affected by any subsequent changes to the time zone of the maintenance point CMAS.
- Inspect the date and time fields
- Make explicit use of the user data fields of the definition when creating definitions. These fields are attributes of the resource definition, and can be used as filter criteria in the Install view of the Resource assignments and so on. For example, you could adopt a convention whereby the first user data field is designated as a control field, which may take either the value T (test) or P (production). To install the definition into a test system, USERDATA1=T would be used as the filter criterion.