Lesson 5: Creating translators

Translators describe an operation that will be performed on a file during a build. A set of translators can be associated with a language definition. During a build, the set of translators associated with a language definition are executed for each file associated with that language definition.

About this task

Complete the following tasks to practice creating translators:

Procedure

  1. Create the IGYCRCTL translator.
  2. Configure the IGYCRCTL DD allocations table.
  3. Create the IEWBLINK translator.
  4. Configure the IEWBLINK DD allocations table.

Lesson 5 Part 1: Creating the IGYCRCTL translator and configuring the IGYCRCTL DD allocations table

You need the IGYCRCTL translator to compile a COBOL program.

Procedure

  1. Create the IGYCRCTL translator.
  2. Configure the IGYCRCTL DD allocations table.

Creating the IGYCRCTL translator

About this task

Perform the following steps to create the IGYCRCTL translator:

Procedure

  1. After you log in to IBM® Engineering Workflow Management, open the Team Artifacts view.
  2. Expand your project area node, and then these nodes: Enterprise Extensions > System Definitions > z/OS.
  3. Expand the Language Definitions node, right-click the Translators node, then select New Translator.
    The Translator editor opens.
  4. In the Name field, enter IGYCRCTL.
  5. In the Description field, provide a brief description of your new translator. This step is not required.
  6. In the Call Method field, select Called program. Browse to the data set definition that specifies the actual translator module you want to use during a build. In this case, it is IGYCRCTL.
    Note: You cannot save your new translator if you select Called program and do not specify a translator module in the Data set definition field.
  7. In the Maximum Return Code field, enter either zero (0) or any positive integer. This step is not required.
    Note: If you leave the Maximum Return Code field empty, z/OS applies a default value of zero (0).
  8. Specify any DD concatenations or DD allocations required by the translator in the appropriate tables. This step is not required; however, building this tutorial sample requires some configuration as explained later.
    For more information about modifying translators, see Building with Ant with Enterprise Extensions and the Rational Build Agent.
  9. Click Save to save your new translator.
    Attention: You cannot save your new translator if you do not specify a translator module in the Data set definition field.

Configuring the IGYCRCTL DD allocations table

The IGYCRCTL DD allocations table specifies the data set allocations that the module associated with the translator expects to find during a build. Specify the following DD allocations for use by the COBOL compiler:

Procedure

  1. Click Add next to the DD allocations table. In the DD name field, enter SYSIN.
    This is the input COBOL source file.
    1. On the Data Set tab, select Translator input.
  2. Click Add next to the DD allocations table. In the DD name field, enter SYSLIN.
    This allocates the target object module data set.
    1. On the Data Set tab, select Data set definition for Data set.
      This indicates that this data set should be allocated using the characteristics specified in the related data set definition.
    2. Click Browse and select the OBJ data set definition.
    3. Select Append member name to data set name.
      This tells the build process to append the member name of the input data set to the data set name.
    4. On the Other Properties tab, select Keep data set when translator completes.
  3. Click Add next to the DD allocations table. In the DD name field, enter SYSPRINT.
    This dataset is used by Ant with Enterprise Extensions to collect build output.
    1. On the Data Set tab, select Data set definition for Data set.
    2. Click Browse, and select the TEMPFILE data set definition.
  4. Create DD allocations for the working data sets used by the COBOL compiler during compilation:
    1. In the DD name field, enter SYSUT1.
    2. On the Data Set tab, select Data set definition for Data set.
    3. Click Browse, then select the TEMPFILE data set definition.
    4. Repeat steps 4a, 4b, and 4c to create DD allocations for SYSUT2, SYSUT3, SYSUT4, SYSUT5, SYSUT6, and SYSUT7.