Create a language definition to specify the translators
to run on each zFile during a build. You can also specify the scanners
that are used to collect source code data about zFile dependencies.
Before you begin
Before you begin this task, you must create a project area. Restriction: Before you can create, modify, or delete a language
definition, you must have permission to change the language definition.
You can manage these permissions from the Project Configuration node
on the Process Configuration tab in the Project Area editor.
About this task
You can create a language definition one of two ways:
- Expand these nodes in the Team Artifacts navigator in your project
area: .
- From the main menu, select .
The following task describes how to create a language definition
from the Language Definitions node in the Team Artifacts navigator.
Procedure
- From the Team Artifacts view, select your repository connection
and log in to your System z® project
area.
- Expand your team node, then .
- Right-click the Language Definitions node and select New
Language Definition.
The Language
Definition editor opens with three tabs: General, Scanners,
and History.
- In the Name field, give your new
language definition a name.
- On the General tab, in the Language field,
indicate a language (code) that your language definition uses.
You can complete the other fields, but they are optional.
Note: You
can also select translators, or specify a build property to associate
with your language definition to call a particular translator when
you run a build. These options are available when you click Add in
the Translators field of the Language Definition
wizard.
- In the File Extensions field, indicate
all the file extensions that you want to associate with this language
definition.
For example, indicate cbl for
COBOL files.
If you provide extensions that are not
associated with explicit language definitions, all files with those
extensions are associated with this language definition.
- In the Description field, briefly
describe your language definition. This step is not required.
- If you made changes to this language definition that do
not require a full analysis of buildable files, click the Ignore
changes to this system definition for dependency builds check
box.
- Select Do not calculate impacted files to
prevent the calculation of impacted files when performing dependency
analysis.
- In the Translators field, specify
and arrange the build order of the translators you want to define
for this language definition.
Note: You can also select
one or more translators, or specify a particular build property to
associate with your new language definition that will call on a particular
translator when you run a build. These options are available when
you click Add in the Translators section of
the Language Definition wizard.
If you want to run any translator
conditionally, specify the condition for the translator that must
be met before the translator can run. Conditions should be specified
as Ant conditions, such as <ac:islessthan arg1="1" arg="2">.
Each time the language definition runs, the condition is evaluated
to determine whether the translator should be run.
The following
notes apply when conditional translators are used:
Notes:
- To use conditions for translators, you must install the version 6.0.5 Build System Toolkit that provides the Ant build toolkit. If you use the Build System Toolkit from a previous version, errors occur.
- Trust outputs must be true.
- Preview builds might not accurately represent what would really
happen in a build, because the preview build cannot always predict
the correct system definitions to use. If you have multiple translators
or properties defined, the first artifact defined is used. However,
if a non-conditional artifact is defined, that one is used, and all
conditional artifacts with the same name are skipped.
- In the Properties field, you can
specify properties, values, and optional conditions for the language
definition. The specified properties are similar to build properties,
but only apply to the language definitions; they do not apply to the
rest of the build. Conditions should be specified as Ant conditions,
such as
<ac:islessthan arg1="1" arg="2">.
If you want to add a language hint to the default scanner,
specify the property
team.enterprise.build.language.definition.languageHint to
the language definition. Specifying the property with a value prevents
files with other languages from being scanned. Specify one of the
following values for the property:
- ASM
- C
- COB
- CPP
- EASY
- ISPF
- JCL
- PLI
- XML
Note: If a property and a build property have the same name,
the language definition property overrides the build property while
the language definition is running. After the language definition
completes, the build property is set to the original build property
value.
- On the Scanners tab, in the Source Code Scanners field,
specify which scanners you want to run against source code that is
associated with this language definition.
If you do not
want to use the default scanner, you can add or remove scanners. Use
Up and
Down to
rearrange the scanners.
For more information about specifying scanners,
see Specifying a source code data scanner.
- In the Dependency Types field, specify
the dependency types that are supported by this language definition.
Ensure that you also specify the translators that resolve each dependency
type.
You can add, edit, or remove dependency types and
translators.
- On the History tab, you can see
all changes made over time by different users to the language definition.
You can review the state of the language definition at any point in
time, which is useful for debugging and fixing dependency build problems.
- Click Save to save your new language
definition.
What to do next
You can also duplicate any language definition. To duplicate
a language definition, follow these steps:
- Open the Team Artifacts view.
- Expand your team node, then .
- Right-click the language definition that you want to duplicate.
- Select Duplicate. The Duplicate language
definition window opens.
- In the Name field, give your duplicate
language definition a name.
- Click OK to duplicate the language definition
or Cancel to stop.
- Your new duplicate language definition displays under the Language
Definitions node. If it does not, refresh the view.