Running System z System definitions generator Ant tasks

Use the System z® system definitions generator to run the following custom Ant tasks. Each task name represents the Java™ class name that implements the task.

Init task

About this task

For information about this task, see the init documentation.

DsDef task

About this task

You can create a data set definition with this task.
Table 1. DsDef task attributes
Attribute Description Default
name Definition name  
description Definition description  
dsName Data set name  
dsMember Member name  
prefixDSN true if the prefix you specified in the build request is to be added as a prefix to the data set name. true
dsDefUsageType
  • 0 = zFolder
  • 1 = new
  • 2 = temp
  • 3 = existing
0 (zFolder)
dsType
  • 0 = PDSE
  • 1 = Sequential
  • 3 = PDS
  • 9 = UNSPECIFIED
0 (PDSE)
storageClass Storage class to which the data set is assigned.  
dataClass Data class that is used to create the data set.  
managementClass Management class that is used to manage the data set.  
volumeSerial Data set volume serial number  
GenericUnit generic group name or unit address  
spaceUnits Unit of allocation spaces to be used. Specify one of the following values:
  • trks (tracks)
  • blks (blocks)
  • cyls (cylinders)
 
recordUnit Unit of allocation quantity. Specify one of the following values:
  • U (single)
  • K (thousand)
  • M (million)
U
primaryQuantity Primary allocation quantity 1
secondaryQuantity Secondary allocation quantity 1
directoryBlocks Number of 256-byte directory blocks provided. 0
recordLength Logical length in bytes 80
blockSize Block size  
recordFormat A z/OS® data set record format string, such as F, FB, V, VB or U. The following values are allowed:
  • F (fixed)
  • V (variable)
  • U (undefined)
  • B (blocked)
  • A (Specifies that the file contains ASA control characters.)
  • M (Specifies that the file contains machine control characters.)
  • S (standard format if the data set record format is fixed; spanned format if the data set record format is variable)
  • T (truncated)
FB
nonImpacting Specifies that changes to this system definition do not force Engineering Workflow Management dependency build request processing to use full analysis instead of change set analysis. False

Example

The following is an example of a DsDef task:
<!-- zFolders -->
<ld:dsdef name="COBOL" dsName="COBOL" dsDefUsageType="0" dsType="0"
spaceUnits="cyls" primaryQuantity="1" secondaryQuantity="1" recordFormat="FB"
recordLength="80" blockSize="0" />  

<!-- New data sets -->
<ld:dsdef name="OBJ" dsName="OBJ"  dsDefUsageType="1" dsType="0"
spaceUnits="cyls" primaryQuantity="1" secondaryQuantity="1" recordFormat="FB"
recordLength="80" blockSize="0" />
<ld:dsdef name="LOAD" dsName="LOAD"  dsDefUsageType="1" dsType="0"
spaceUnits="cyls" primaryQuantity="1" secondaryQuantity="1" recordFormat="U"
recordLength="0" blockSize="32760" />

<!-- Temporary data set -->
<ld:dsdef name="TEMPFILE" dsDefUsageType="2" prefixDSN="false"
dsType="9" spaceUnits="trks" primaryQuantity="5" secondaryQuantity="5"
genericUnit="SYSALLDA" />

<!-- Existing data sets -->
<ld:dsdef name="IGYCRCTL" dsName="COBOL.V4R1M0.SIGYCOMP" dsMember="IGYCRCTL"
dsDefUsageType="3" prefixDSN="false"/>
<ld:dsdef name="IEWBLINK" dsMember="IEWBLINK" dsDefUsageType="3"
prefixDSN="false"/>
<ld:dsdef name="SCEELKED" dsName="CEE.SCEELKED" dsDefUsageType="3"
prefixDSN="false"/>

Translator task

About this task

Run this task to create a translator. Translator task accepts Allocation, Concatenation, and VariableType as child elements. Concatenation accepts Allocation as a child element. Use the propertyName attribute with DD allocations to specify certain build properties.

The following is a list of attributes available for Translator task, Allocation, Concatenation, and VariableType.

Table 2. Translator task attributes
Attribute Description Default
name Translator name  
propertyName Build property name  
description Translator description  
dataSetDefinition Data set definition for translator module  
ddnamelist Alternative DD names list for the translator  
callMethod Call method:
0
MVS™ program
1
ISPF command
2
TSO command
3
Ant Snippet
4
Ant Build File
0
commandMember For call method 1 or 2, the ISPF/TSO command string to run. For call method 4, the name of the Ant build XML to run.  
antSnippet For call method 3, the snippet of the Ant XML to run  
linkedit Specifies that the translator is used for link edit during a dependency build. If you set this attribute to true, the post-link-edit parser analyzes object decks and program objects that are linked in the generated program object. False
nonImpacting Specifies that changes to this system definition do not force Engineering Workflow Management dependency build request processing to use full analysis instead of change set analysis. False
defaultOptions Option string that is passed to the translator.
Note: If you use the string @{ssi_info} as a defaultOptions attribute, it is converted to a hexadecimal value that represents a time stamp from a dependency build.
 
maxRC Maximum return code allowed 0
Table 3. Allocation attributes
Attribute Description Default
name Allocation name. When the allocation is enclosed in a TranslatorTask, specify a DD name. When the allocation is enclosed in a Concatenation, you do not have to specify a name.  
dataSetDefinition The name of the data set definition that is associated with this allocation  
propertyName The name of a build property that is associated with this allocation. When you specify both dataSetDefinition and propertyName, propertyName takes precedent.  
member Whether a member name is appended to the data set name used for this allocation False
keep Whether this allocation is kept (saved).
Note: This attribute is for temporary data sets only.
False
publish Whether this allocation is published as a log; for example, SYSPRINT.log False
input Whether this allocation is considered input to the language definition that contains the translator that contains this allocation False
output Whether this allocation is considered output of the language definition that contains the translator that contains this allocation False
outputNameKind The type of output name. Possible values include the following types:
  • SAME_AS_INPUT
  • USE_PATTERN
  • USE_VARIABLE
SAME_AS_INPUT
outputName The output name string. When outputNameKind is SAME_AS_INPUT, the build ignores it. When outputName is USE_PATTERN, the build uses the pattern string that you specify. When outputName is USE_VARIABLE, it indicates the name of a variable whose value is used as a pattern.  
condition The Ant condition string, written in escaped XML, that must evaluate to true for the DD to be used at runtime.
Note: The condition attribute is optional.
 
path The path name of a file to allocate  
disp The file disposition for normal and abnormal termination of the job step. The possible values are KEEP and DELETE.  
options Options for path name allocation. The options list is a list of keywords separated with commas. The supported keywords are:
  • ORDWR
  • OEXCL
  • OSYNC
  • OTRUNC
  • OCREAT
  • OWRONLY
  • ORDONLY
  • OAPPEND
  • ONOCTTY
  • ONONBLOCK
 
perm Permissions on the file in Octal format (755 for example)  
fileType Tells the sequential access method services whether the data is to be treated as text or binary. So, the possible values are TEXT and BINARY.  
Table 4. Concatenation attributes
Attribute Description Default
name Concatenation name. Specify a DD name.  
condition The Ant condition string, written in escaped XML, that must evaluate to true for the DD to be used at runtime.
Note: The condition attribute is optional.
 
Table 5. VariableType attributes
Attribute Description Default
name Variable name  
value Variable value  

Example

The following is an example of a Translator task that calls an MVS program (high-level assembler).
Attention: The SYSLIB DD concatenation contains one build property–teamz.mylib–and the SYSPRINT DD allocation contains another: teamz.sysprint.
<ld:translator name="ASMMAP" dataSetDefinition="ASMA90"
   defaultOptions="SYSPARM(MAP),DECK,NOOBJECT,&amp;LIST"
   ddnamelist="SYSLIN,,,SYSLIB,SYSIN,ANTPRINT"
   maxRC="0">
   <ld:concatenation name="SYSLIB">
      <ld:allocation dataSetDefinition="SDFHMAC"/>
      <ld:allocation propertyName="teamz.mylib"/>
   </ld:concatenation>
   <ld:allocation name="SYSIN" input="true"/>
   <ld:allocation name="SYSPUNCH" dataSetDefinition="OBJ" member="true"/>
   <ld:allocation name=SYSPRINT" propertyName="teamz.sysprint"/>
   <ld:allocation name="SYSUT1" dataSetDefinition="TEMPFILE"/>
   <ld:allocation name="SYSUT2" dataSetDefinition="TEMPFILE"/>
   <ld:allocation name="SYSUT3" dataSetDefinition="TEMPFILE"/>
   <ld:variable name="LIST" value="NOLIST"/>
</ld:translator>
The following is an example of a Translator task that calls a REXX program in a TSO environment:
<ld:translator name="TOUPPER" callMethod="2"
    commandMember="EXEC '${teamz.scm.dataset.prefix}.REXX(TOUPPER)'"    maxRC="0">
    <ld:allocation name="INDD" input="true"/>
    <ld:allocation name="OUTDD" dataSetDefinition="OUTPUT" member="true"
output="true" outputnamekind="USE_PATTERN" outputName="*A" />
</ld:translator>
The following is an example of a Translator task that contains a conditional allocation and concatenation:

<ld:translator callMethod="0" dataSetDefinition="Assembler" defaultOptions="SYSPARM(DSECT),DECK,NOOBJECT"
maxRC="0" name="BMS map processing (copybook generation)">
    <ld:concatenation condition="<equals arg1=&quot;true&quot;
arg2=&quot;${myProp}&quot;/&gt;" name="SYSLIB">
       <ld:allocation dataSetDefinition="CICS.SDFHMAC"/>
       <ld:allocation dataSetDefinition="SYS1.MACLIB"/>
   </ld:concatenation>
   <ld:allocation condition="<equals arg1=&quot;true&quot;
arg2=&quot;${myProp}&quot;/>" input="true" name="SYSIN"/>

   <ld:allocation dataSetDefinition="Temporary file" name="SYSPRINT"
publish="true"/>
   <ld:allocation dataSetDefinition="Copybooks" member="true" name="SYSPUNCH"
output="true"/>
   <ld:allocation dataSetDefinition="Temporary file" name="SYSUT1"/>

   <ld:allocation dataSetDefinition="Temporary file" name="SYSUT2"/>

   <ld:allocation dataSetDefinition="Temporary file" name="SYSUT3"/>

</ld:translator>

LangDef task

About this task

Run this task to create a language definition. This task accepts scopedProperty as a child element. Use the translators attribute to specify certain build properties.

You can nest a <dependencytype> task within a <Lang Def> task to specify the dependency types that you want your language definition to support, and the translators that resolve each dependency type.

When you set the defaultScanner attribute to False, enclosed <dependencytype> tags are ignored and no dependency types are added to the generated language definition.

When you set the defaultScanner attribute to true, and when you do not nest any <ld:dependencytype> tags, all dependency types that are supported by the System z scanner are added to the generated language definition, and all translators are used to resolve each dependency type.

Notes:
  • The runtime code assumes that any name you specify in the translators attribute is the name of a translator. When you do not specify a translator name, the runtime code treats the translator name as a build property. When the runtime code treats the translator name as a build property, define the property in the build definition to point to a specific translator.
  • You can specify more than one translator in the translators attribute by using a comma (,) as a delimiter.

The following is a list of attributes available for LangDef task and scopedProperty.

Table 6. LangDef task attributes
Attribute Description
name Language definition name
description Language definition description
translators Names of translators, delimited by a comma
conditions A comma-separated list of conditions that correspond to the translators attribute. If a translator does not have a condition, its entry in the comma-separated list is blank. If no translators have conditions, there is no need to specify this attribute.
stepNames Names of translator step names, delimited by a comma
nonImpacting Specifies that changes to this system definition do not force Engineering Workflow Management dependency build request processing to use full analysis instead of change set analysis. The default is False.
defaultExtension Associated default file extension
languageCode Language code for the language definition. See the following table for a list of supported language codes.
mod Specifies that data is appended to an existing allocated data set. The default is False.
Note: This attribute is for temporary data sets only.
Table 7. scopedProperty attributes
Attribute Description Default
name Name of the property  
value Value of the property  
condition The Ant condition string, written in escaped XML, that must evaluate to true for the property to be available at runtime.
Note: The condition attribute is optional.
 
Table 8. Supported language codes
Language code Description
ASM Assembler
BIN Binary
BND Bind
C C
CPP C++
EASY CA Easytrieve
COB COBOL
JCL JCL
LNK link-edit
PLI PL/I
OTH Others
Table 9. dependencytype task attributes
Attribute Description Required
name The dependency type that is supported by your language definition yes
translators A list, which is separated by commas, of translators that resolve this dependency type. If you omit this list, all translators included in your language definition are specified. If you specify a zero-length string (""), no translator is specified. no
Table 10. Dependency types supported by the default System z scanner
Type Description
COPY COBOL COPY statements and PL/I %INCLUDE statements
++INCLUDE CA Easytrieve ++INCLUDE and -INC statements
SQL INCLUDE EXEC SQL INCLUDE statements
MACRO Assembler MACRO calls
PROC JCL PROC invocations

Example

The following is an example of a LangDef task with subsystem specified in the subsystems attribute:
<ld:langdef
name="COBOL-CICS-DB2" translators="IGYCRCTL-CICS-DB2" defaultExtension="cbl"
      languageCode="COB" subsystems="CICS,DB2"/>
The following is an example of a LangDefTask with a build property specified in the translators attribute.
Remember: When you do not specify a translator name, teamz.my.preprocessor is treated as a build property.
<ld:langdef name="MY PLI" translators="teamz.my.preprocessor,IBMPLI" defaultExtension="pli"
      languageCode="PLI" subsystems=""/>
The following is an example of a LangDefTask with nested <dependencytype> tags.
<ld:langdef defaultExtension="cbl" languageCode="COB"
name="COBOL compilation" translators="COBOL
compilation (for subroutines)”>
       <ld:dependencytype name="COPY"/>
</ld:langdef>
<ld:langdef languageCode="COB" name="COBOL compilation (CICS&amp;amp;amp;DB2)
and link-edit"
translators="COBOL compilation (CICS&amp;amp;amp;DB2),Link-edit”>  

      <ld:dependencytype name="COPY" translators="COBOL compilation
(CICS&amp;amp;amp;DB2)">    
      <ld:dependencytype name="SQL INCLUDE" translators="COBOL
compilation (CICS&amp;amp;amp;DB2)"/>
</ld:langdef>
The following is an example of a LangDef task with the condition attribute and scopedProperty element, where its first translator is conditional and it contains a conditional property named 'prop1':

<ld:langdef conditions="<equals arg1=&quot;true&quot;
arg2=&quot;${myProp}&quot;/&gt;,," defaultScanner="false"
defaultpatterns="bms" languageCode="ASM"
            name="BMS map processing"
            translators="BMS map processing (copybook generation),BMS
map processing (object deck generation),Link-edit">  
   <ld:scopedProperty condition="<equals arg1=&quot;a&quot;
arg2=&quot;b&quot;/&gt;" name="prop1" value="val1"/>
</ld:langdef>

Export task

About this task

For information about this task, see the export documentation.

ResolveMetadata task

About this task

Run this task to associate zFiles with language definitions and zFolders with data set definitions. These associations are stored in Jazz® source control management. You can make an association between zFiles and language definitions by using the zFile extension and the defaultExtension attribute of a language definition; for example, if the language definition COBOL has the defaultExtension attribute cbl, the zFile HELLO.cbl is associated with that language definition. You can make an association between zFolders and data set definitions by using the names of zFolders and the names of data set definitions. For example, if you have a data set definition named HELLO.COBOL, the zFolder HELLO.COBOL is associated with the data set definition of the same name.
You can nest <langdefrule> and <dsdefrule> to apply association rules that override any defaults.
Note: You can associate 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 project areas in the same repository, then associates zFiles and zFolders. For more information, see Creating build definitions or ResolveMetadata task.
Table 11. ResolveMetadata task attributes
Attribute Description Default
projectRoot Root directory of the zComponent project. The directory where the script is stored.
useDefaultRules Assign language definitions that are explicitly based on default file extensions. True
Table 12. landefrule attributes
Attribute Description Default
match The regular expression that is used for this rule. The regular expression is used against the string (zFolder name)/(zFile name); for example COBOL/source.cbl. None
languageDefinition The name of the language definition you want to associate when the regular expression matches the string (zFolder name)/(zFile name). None
Table 13. dsdefrule attributes
Attribute Description Default
match Regular expression that is used for this rule. The regular expression is used against zFolder name, for example COBOL. None
dataSetDefinition Data set definition name to be associated with when the regular expression matches. None

Example

In the following example, zFolder 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.
<ld:resolvemetadata projectRoot="../MortgageApplication-EPSCMORT">
        <ld:dsdefrule match="BMS" dataSetDefinition="ASM"/>
        <ld:langdefrule match=".*/EPSCSMRT\.cbl$" languageDefinition="COBOL-DYNAM-CICS"/>
        <ld:langdefrule match=".*/EPSCMORT\.cbl$" languageDefinition="COBOL-DYNAM-CICS-DB2"/>
</ld:resolvemetadata>

SourceCodeData task

About this task

Run this task to enable or disable source code data scanning for the stream, into which the current repository workspace flows. This task also creates dependency source code data based on the enclosed SourceCodeDataRule data type.
Table 14. SourceCodeData attributes
Attribute Description Default
projectRoot Root directory of a project. None
scan A Boolean value that indicates whether source code data scanning is enabled or not. "true" (=enabled)
A SourceCodeData task can enclose one or more SourceCodeDataRule data types. SourceCodeDataRule data type can contain the following attributes:
Table 15. SourceCodeDataRule attributes
Attribute Description Default
match A regular expression that is used for matching a file path name. None
A SourceCodeRule data type can enclose one or more DependencyData data types. DependencyData data types define the dependency data that is created when the regular expression in the SourceCodeRule matches. When a SourceCodeRule data type does not enclose any DependencyData data types, the SourceCodeDataTask deletes all user-defined dependency data for the matched files. DependencyData data type can contain following attributes:
Table 16. DependencyData attributes
Attribute Description
logicalName Dependency logical name.
fileType Dependency file type.
path Dependency path.
referenceType Dependency reference type.

Example

The following is an example of a SourceCodeData task:
<ld:sourcecodedata projectRoot="../MortgageApplication-EPSMLIST">
<ld:sourcecodedatarule match="LINK/EPSMLIST\.lnk$">
    <ld:dependency logicalName="EPSMLIST" fileType="OBJ" path="SYSLIB"
referenceType="LINK"/>
    </ld:sourcecodedatarule>
</ld:sourcecodedata>

FileMetadata task

About this task

Run this task to specify arbitrary zFile metadata or file line delimiters. File metadata are stored in Jazz source control management. You can nest <filemetadatarule> and <linedelimiterrule> to apply the rules that specify certain metadata.
Table 17. FileMetadata task attributes
Attribute Description Default
projectRoot Root directory of the zComponent project The directory where the script is stored.
Table 18. filemetadatarule attributes
Attribute Description Default
match The regular expression that is used for this rule is used against the string (zFolder name)/(zFile name); for example, COBOL/source.cbl. None
name The name of the file metadata you want to modify when the regular expression matches the string (zFolder name)/(zFile name). None
value The value of the file metadata you want to specify. If the value is an empty string, the file metadata is removed. None
Table 19. linedelimiterrule attributes
Attribute Description Default
match The regular expression that is used for this rule against the string (zFolder name)/(zFile name); for example, COBOL/source.cbl. None
value The line delimiter that you want to set for the file when the regular expression matches the string (zFolder name)/(zFile name). Use one of following line delimiters:
  • None
  • CR
  • LF
  • CRLF
  • Platform
Platform

Example

In the following example, the mvsCodePage zFiles metadata under zFolder COBOL is set to IBM-939, the EPSCMORT.cbl team.enterprise.build.alwaysload metadata is set to true, and the zFiles line delimiter with file extension .bms is set to Platform.
<ld:filemetadata projectRoot="../MortgageApplication-EPSCMORT">
       <ld:filemetadatarule match="COBOL/.*" name="mvsCodePage"
value="IBM-939"/>
       <ld:filemetadatarule match="COBOL/EPSCMORT.cbl$" name="team.enterprise.build.alwaysload"
value="true"/>
       <ld:linedelimiterrule match=".*/.*.bms$" value="Platform"/>
</ld:filemetadata>

DeleteDsDefs task

About this task

Run this task to delete obsolete or unneeded data set definitions. The default behavior of this task is to delete all data set definitions unless at least one DsDefNameRule is specified as a nested element. The DeleteDsDefs task element has an optional preview attribute. Nested DsDefNameRule elements can be included to specify which data set definitions to delete.
Table 20. Attributes for the delete task
Attribute Description Default
preview This attribute can be set on the delete task. If it is set to true, the resources that match the criteria are displayed and are not deleted. When this attribute is set to false or is removed, the resources that match the criteria are deleted. true
match This attribute can be set on the NameRule element. It contains the regular expression that is used for this rule. The regular expression is compared to the resource name, and if it matches the resource name, the resource is deleted. None

Example

The following is an example of the DeleteDsDefs task where all data set definitions are displayed and not deleted:

<target name="example01" description="Delete all data set definitions" >
  <ld:deletedsdefs preview="true"/>
</target>
The following is an example of the DeleteDsDefs task where only the specified data set definition named delete.definition is deleted:

<target name="example02" description="Delete a data set definition" >
  <ld:deletedsdefs>
     <ld:dsdefnamerule match="^delete\.definition$"/>
  </ld:deletedsdefs>
</target>

Deletetranslators task

About this task

Run this task to delete obsolete or unneeded translators. The default behavior of this task is to delete all translators unless at least one NameRule is specified as a nested element. The DeletetranslatorsTask element has an optional preview attribute. Nested NameRule elements can be included to specify which translators to delete.
Table 21. Attributes for the delete task
Attribute Description Default
preview This attribute can be set on the delete task. If it is set to true, the resources that match the criteria are displayed and are not deleted. When this attribute is set to false or is removed, the resources that match the criteria are deleted. true
match This attribute can be set on the NameRule element. It contains the regular expression that is used for this rule. The regular expression is compared to the resource name, and if it matches the resource name, the resource is deleted. None

Example

The following is an example of the Deletetranslators task where all translators are deleted:

<target name="example01" description="Delete all translators" >
  <ld:deletetranslators/>
</target>
The following is an example of the Deletetranslators task where the specified translator named delete.translat is displayed and not deleted:

<target name="example02" description="Delete a translator" >
  <ld:deletetranslators preview="true">
     <ld:namerule match="^delete\.translat$"/>
  </ld:deletetranslators>
</target>

Deletelangdefs task

About this task

Run this task to delete obsolete or unneeded language definitions. The default behavior of this task is to delete all language definitions unless at least one NameRule is specified as a nested element. The Deletelangdefs task element has an optional preview attribute. Nested NameRule elements can be included to specify which language definitions to delete.
Table 22. Attributes for the delete task
Attribute Description Default
preview This attribute can be set on the delete task. If it is set to true, the resources that match the criteria are displayed and are not deleted. When this attribute is set to false or is removed, the resources that match the criteria are deleted. true
match This attribute can be set on the NameRule element. It contains the regular expression that is used for this rule. The regular expression is compared to the resource name, and if it matches the resource name, the resource is deleted. None

Example

The following is an example of the Deletelangdefs task where all language definitions are deleted:

<target name="example01" description="Delete all language definitions" >
  <ld:deletelangdefs preview="false"/>
</target>
The following is an example of the Deletelangdefs task where the specified language definitions whose names start with LD-MORT-LD are displayed and not deleted:

<target name="example02" description="Delete language definitions" >
  <ld:deletelangdefs preview="true">
     <ld:namerule match="LD-MORT-LD*"/>
  </ld:deletelangdefs>
</target>