SourceCodeData task

About this task

Run this task to control stream data scanning and to create dependency source code data.
Table 1. SourceCodeData attributes
Attribute Description Required
projectroot Root directory of the component 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
scan A Boolean value that indicates whether source code data scanning is enabled or not. Valid values are true and false. The default is true. No

The sourceCodeDataRule element is specified within the sourceCodeData element. Each sourceCodeDataRule element identifies a file to process. At least one sourceCodeDataRule element is required. The following table describes the valid sourceCodeDataRule attribute values.

Table 2. SourceCodeDataRule attributes
Attribute Description Required
match A regular expression for the file name that is the target of this rule. This expression is used to match the file path string folder/file. For example, the match pattern "^.*/EPSCSMRT\.cbl$" matches on any file named "EPSCSMRT.cbl" in any folder. Yes

The dependency element is specified within the sourceCodeDataRule element. Each dependency element defines dependency data for the matched file. If no dependency elements are specified, the sourceCodeData task deletes all user-defined dependency data for the matched file. The following table describes the valid dependency attribute values.

Table 3. DependencyData attributes
Attribute Description Required
logicalName Dependency logical name Yes
fileType Dependency file type Yes
path Dependency path No
referenceType Dependency reference type Yes

Example

The following code is an example of a sourceCodeData task:
<xt:sourcecodedata>
  <xt:sourcecodedatarule match="QLNKSRC/MLGRPTS\.SRVPGMSRC$">
    <xt:dependency
        logicalName="MLGRPTR"
        fileType="USE"
        path="*LIBL/MLGRPTR OBJTYPE(*MODULE)"
        referenceType="SRVPGM External File"/>
  </xt:sourcecodedatarule>
</xt:sourcecodedata>