z/OS translators

A translator describes an operation that is run on a file during a build.

You can select and order translators in a language definition. During a build, each translator in a language definition is started for every file that is associated with that language definition. You can create translators from the Team Artifacts view by expanding these nodes: Enterprise Extensions > System Definitions > z/OS > Language Definitions. Optionally, you can select File > New > Other > Enterprise Extensions > z/OS > Translator from the main menu.

More specifically, each translator represents an operation that must be run on buildable files that are associated with a language definition. For example, a CICS® COBOL source file might be associated with a language definition that contains two translators: one for the CICS preprocessor and one for the COBOL compiler.

In the Translator editor, which you use to create or modify a translator, there is a Call Method field, where you can choose either a called program (usually a compiler), an ISPF command or executable file (usually a script), or a TSO command or executable file (also usually a script) to call your translator. If you choose to use a called program, browse to a data set definition that points to a translator module. A COBOL compiler translator specifies the existing data set definition and has the same data set and member names as the COBOL compiler module.
Note: If the purpose of the translator is to start a z/OS® binder to run link edit and you want your build process to automatically build the main program when one of its subprogram changes, check the Link-edit: perform load module dependencies scanning box. For more details about the load module parser, see t_RTCz_collectloadmoduleinfo.html#t_RTCz_collectloadmoduleinfo
When you run a build, you can specify variables in a z/OS translator to pass information about the member the translator builds to a REXX script. Use one of the following variables in a z/OS command:
  • @{source.member.name}
  • @{source.dataset}
  • @{source.project}
  • @{source.component}
Here is an example:
exec 'MYLIB.TEST.REXX(SCRIPT)' '@{source.project}, @{source.member.name}'
You can also combine a build property with a system variable in a z/OS build command; for example:
exec 'MYLIB.TEST.REXX(SCRIPT2)' '@{source.member.name}, ${build-option}' 

Notice that the syntax to use your build property in such a z/OS build command is ${<property>} where <property> is the name of the property you define in your build definition. In the preceding example, ${build-option} represents that build property. For more information about defining this build property in your build definition, see Using the Ant with Enterprise Extensions build definition editor.

The editor also includes a DD concatenations field, where you must indicate the DD name to allocate to the concatenation. For example, the SYSLIB concatenation would be specified here. Beside the DD name is a comma-delimited list of data set definitions that are concatenated together.

The translator editor also displays a DD allocations table. Each entry in the DD allocations table has a flag that indicates whether the build keeps the DD name for a future translator. If you set the flag to Yes, the data set allocation is preserved for use by subsequent steps in the build script. If you mark a data set as Temporary in a data set definition, but as Keep in the DD allocations table, that data set is deallocated at the end of the build script execution. Data sets that you mark as Temporary are deallocated at the end of the translator step.

You can also add new DD allocation to the translator. Click Data Set Properties on the Translator window. Select DD allocations sections. Click the Add button to add DD allocation. On the DD Resource tab of the Add DD Allocation panel. Specify the HFS path field if there are HFS files in your package. Click the Properties button to specify properties of your HFS files. You need to specify the following properties:
  • The Permissions section
    • User: select the Read and the Write check boxes.
    • Group: select the Read check box.
    • Others: select the Write and the Execute check boxes.
  • The PATHDISP section
    • Keep: select the Normal check box.
    • Delete: select the Abnormal check box.
  • The FILEDATA section: select the Text radio button
For more information on the OPTION section, refer to Requesting dynamic allocation.

On the Outpts tab of theDD allocation table, you can check to select Save data set as output to specify an input member to be defined as an output.

You can specify conditions for DD names in the DD concatenations and DD allocations tables to determine whether the entry is processed. You can specify multiple DD names with the same name, as long each of them specifies a condition. See Creating a z/OS language definition for more information about conditionally running translators.

For a practical example of how to use language definitions and translators, see Building with Ant with Enterprise Extensions and the Rational Build Agent.

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