The task is used to associate zFiles with language definitions and zFolders with data set definitions. These associations are stored in Jazz Source Control Management (SCM) as properties or name-value pairs.
An association between a zFile and a language definition can be made by using the file extension and the defaultPatterns attribute of a language definition; for example, if the language definition COBOL has a defaultPatterns attribute cbl, then by default, the file HELLO.cbl is associated with that language definition. Using the default association mechanism requires no file metadata definitions.
Another way to associate a zFile with a language definition is to directly assign a file to a language. This method requires file metadata to be created and saved with the file which is the purpose of the task.
An association between a zFolder and a data set definition is made by directly assigning a folder to a data set. This method requires folder metadata to be created and saved with the folder which is also handled by the task. This association controls where source code is loaded during a build. During a build all files in the zFolder are loaded into a zOS® data set defined by the data set definition associated with the zFolder.
The following table describes the task specific attributes for the task:
| Task Specific Attributes | ||
| Attribute | Description | Required |
| projectRoot | Root directory of the zComponent project. The default is to use the location of the build script. Specifying a path that is relative to the location of the build script is acceptable. | No |
| useDefaultRules |
Specifies whether or not to explicitly assign a language definition that is based on default file extensions. Valid values are true and false. The default is true.
Note: Use the default value with care. Any file matched while useDefaultRules is set to |
No |
The langDefRule element is specified within the element. Each langDefRule element defines an association between a zFile and a language definition. The following table describes the valid langDefRule attribute values:
| langDefRule Element Attributes | ||
| Attribute | Description | Required |
| match |
Specify a regular expression for the file name that is the target of this rule. This expression is used to match the file path string "zFolder/zFile" where the zFolder is a child of the zOSsrc folder. For example, the match pattern "^.*/EPSCSMRT\.cbl$" will match on any zFile named "EPSCSMRT.cbl" in any zFolder.
|
Yes |
| languageDefinition | Specify the name of the Enterprise Extensions language definition to associate with the file. | Yes |
The DsDefRule element is specified within the element. Each DsDefRule element defines an association between a zFolder and a data set definition. The following table describes the valid DsDefRule attribute values:
| DsDefRule Element Attributes | ||
| Attribute | Description | Required |
| match |
Specify a regular expression for the folder name that is the target of this rule. This expression is used to match the folder path string "zFolder" where the zFolder is a child of the zOSsrc folder. For example, the match pattern ASM will match on any zFolder named ASM.
|
Yes |
| dataSetDefinition | Specify the name of the Enterprise Extensions data set definition to associate with the folder. This should be a zFolder data set definition; data set usage type 0 - Destination data set for a zFolder. | Yes |
Associations can be made between zFiles and zFolders with language definitions and data set definitions that are stored in different project areas. The system definitions generator automatically collects all language definitions and data set definitions in all project areas in the same repository, then associates zFiles and zFolders using the complete lists.
BMS is associated with the ASM data set definition. EPSCSMRT.cbl is associated with the COBOL-DYNAM-CICS language definition and EPSCMORT.cbl is associated with the COBOL-CICS -DYNAM-CICS-DB2 language definition:
<xt:resolvemetadata projectRoot="../MortgageApplication-EPSCMORT">
<xt:dsdefrule match="BMS" dataSetDefinition="ASM"/>
<xt:langdefrule match=".*/EPSCSMRT\.cbl$" languageDefinition="COBOL-DYNAM-CICS"/>
<xt:langdefrule match=".*/EPSCMORT\.cbl$" languageDefinition="COBOL-DYNAM-CICS-DB2"/>
</xt:resolvemetadata>