IBM i language definitions

A language definition serially connects the translators used to build artifacts. The association of a language definition to an artifact provides instructions for how the artifact should be built.

You can create and maintain language definitions that specify the translators performed on each buildable file during a build, and also the scanners used to collect source code data about file dependencies.

You can create language definitions for a project area, and you can use the same language definition for several buildable files. For example, one COBOL language definition can be associated with all of your COBOL source files.

You can assign language definitions to certain files when you create a file. You can also automatically associate certain files with certain language definitions by specifying one or more file extensions in the language definition editor. For example, if you specify cbl as a language definition file extension, then any (COBOL) files with that .cbl extension will automatically be associated with that language definition.

You can conditionally run translators in language definitions. If you want to run any translator conditionally, specify the condition for the translator that must be met before the translator can run. See Creating an IBM i language definition for more information about conditionally running translators.

When a language definition is running, the return code of each translator is available in a property called STEPnum_RC, where num is the number of the translator. For example, the return code of the first translator is available in the property STEP1_RC. The return codes enable other conditions specified later in the same language definition to determine whether an artifact runs, depending on the return codes of previous translators.

From the Team Artifacts navigator, you can create, view, or modify language definitions by expanding these nodes: Enterprise Extensions > System Definitions > IBM i > Language Definitions.

You can also create a language definition by selecting File > New > Other > Enterprise Extensions > IBM i > Language Definition from the main menu.

You can create a translator by selecting File > New > Other > Enterprise Extensions > IBM i > Translator from the main menu.

For more information about translators, see IBM i translators.

For an example of how to use language definitions and translators, see Using an Ant with Enterprise Extensions build to compile a COBOL application. Even though the example is based on the z/OS platform, the key concepts are common among platforms.

video icon Video

Jazz.net channel
Software Education channel

learn icon Courses

IoT Academy
Skills Gateway

ask icon Community

Jazz.net
Jazz.net forums
Jazz.net library

support icon Support

IBM Support Community
Deployment wiki