Adding version information and custom keyword values to your development resources

You can add a version and other custom keyword values to deployable resources during development.

About this task

Version information is assigned to a development resource by including the following string in the source code of the resource:
$MQSI_VERSION=VersionIdentifier MQSI$
For example:
$MQSI_VERSION=v1.0 MQSI$
Custom keywords are assigned to a development resource by including the following string in the source code of the resource:
$MQSI KeywordName=KeywordValue MQSI$
For example:
$MQSI Author=John Smith MQSI$
Note: Do not use BAR as a keyword name. The BAR keyword is associated with each object automatically when it is deployed and it contains the full path name of the BAR file that deployed the object.
Note: Do not use the following characters within keywords because they cause unpredictable behavior:
^ $ . | \ < > ? + * = & [ ] ( )
You can use these characters in the values that are associated with keywords; for example:
  • $MQSI RCSVER=$id$ MQSI$ is acceptable (RCSVER is a valid keyword name).
  • $MQSI $name=Fred MQSI$ is not acceptable ($name is not a valid keyword name).
The method for adding version information, custom keywords, and custom keyword values to the source code varies depending on the resource type. The following table describes a method that you can use to add version and custom keyword information to each type of resource:
Resource type Method to add version and custom keywords
Message flows Add the VersionIdentifier to the Version field in the message flow properties. Information added to the Version field does not need to be encased in $MQSI tags.

Add custom keyword strings to the Short Description or Long Description fields in the message flow properties by using the IBM® Integration Toolkit or the web user interface.

Subflows Add the VersionIdentifier to the Version field in the subflow properties. Information added to the Version field does not need to be encased in $MQSI tags.

Add custom keyword strings to the Short Description or Long Description fields in the subflow properties by using the IBM Integration Toolkit or the web user interface.

Note: If you use Compile and in-line resources when you build your BAR file, you must use a different keyword in each instance of a subflow. Only the first recorded instance of each keyword within the message flow .cmf file is available to applications that use the IBM Integration API, which includes the IBM Integration Toolkit.

The order that subflows appear in the .cmf file is not guaranteed.

Maps Add version and custom keyword strings to the Description or Documentation fields in the map properties by using the IBM Integration Toolkit or the web user interface.
ESQL Add version and custom keyword strings as comments in the ESQL code. For example:
-- $MQSI_VERSION=v1.0 MQSI$
-- $MQSI Author=John Smith MQSI$
DFDL schema Add version and custom keyword strings to the Comment property on the Representation properties tab of the DFDL schema editor.
XML schema Add version and custom keyword strings to a schema documentation element in the XML schema. For example:
<xsd:documentation>$MQSI_VERSION=v1.0 MQSI$ 
$MQSI Author=John Smith MQSI$</xsd:documentation>
XSL stylesheets Add version and custom keyword strings to an XML stylesheet as an XML comment. For example:
<!-- $MQSI_VERSION=v1.0 MQSI$ -->
<!-- $MQSI Author=John Smith MQSI$ -->
JAR files To add version and custom keyword strings to a JAR file, complete the following steps:
  1. Create a keywords.txt file.
  2. Add the version or custom keyword strings to the keywords.txt file.
  3. In the operating system, locate the directory that contains the Java™ files. The directory is usually in the format: WorkspaceLocation/ContainerNameJava, where WorkspaceLocation is the fully qualified path to the directory of your IBM Integration Toolkit workspace, and ContainerName is the name of your application or library.
  4. Create a subdirectory in this directory, named META-INF, and add the keywords.txt file to the META-INF subdirectory.

When the BAR file is created, the BAR file contains a .jar file that includes the Java code and the keywords.txt file.

Applications and Libraries It is not possible to add version or custom keyword strings to an application or library during development. Instead, you must complete the following steps:
  1. Create a keywords.txt file.
  2. Add the version or custom keyword strings to the keywords.txt file.
  3. Package the application or library in a BAR file.
  4. Add the keywords.txt file to the META-INF directory within the .appzip, .libzip, or .shlibzip file that is in the BAR file.
For information about viewing version or custom keyword information in your packaged or deployed resources, see the following topics: