Creating a Task Definition

Each task definition references an IMS program alias (IPA) and defines the inputs required to perform a specific task, as well as the output fields returned from the task. Task definition names are used to run the task from a client application. The IPA on which you choose to base your task definition should be the one associated with the host program with which you want to interact, as that IPA contains the COBOL copybooks created from that host program.

Task definitions are saved in task files. A task file is set of task schemas in XML format that maps COBOL copybook information to XML, and each task file contains one or more task definitions.

Note Before you can create a task definition, you must create at least one IMS program alias. For more information, see Creating an IMS Program Alias.
To create a task definition
  1. In the Task Builder Guide, click the Task Definition button.

  2. In the first screen, click New from the row of buttons at the bottom of the window.

  3. Enter an IMS Transaction Code. This should be the name of the IMS transaction as it is known on the host.

  4. From the IMS Program Alias (IPA) table, select the IPA on which to base this task definition, and then click Next.

  5. Select the fields from the Program Input Area to use as inputs in this task, and then click Add to add them under Task Input Fields.


    To add all the fields from a node in the Program Input Area, click and drag the top level node folder over to the Task Input Fields area.

    Child nodes are automatically included with parent nodes.

  6. (Optional) Select the Add Security Fields check box to add User ID and password as input fields for this task, and when have finished, click Next.
    Note When the task is executed, the client user will be prompted for these values. The values the user enters will then be passed to the host as part of the task. If appropriate credentials are not provided, the task will fail to retrieve data from the host.
  7. When you have finished adding input fields, click Next.

  8. Select the fields from the Program Output Area to use as outputs in this task, and then add them under Task Output Fields.

  9. When you have finished adding output fields, click Next.

  10. Click an input field to display its properties, and then modify the property values as required.
    Note Not all field properties can be modified.
  11. Repeat the preceding step for each input field you want to modify, and when you have finished, click Next.

  12. Click an output field to display its properties, and modify the property values as required.

  13. Repeat the preceding step for each output field you want to modify, and when you have finished, click Next.

    If, in your IMS program alias, you specified a single Program I/O area for both inputs and outputs, the preceding steps are combined for inputs and outputs.

  14. Name your task definition and a task file in which to save it.
    • Your task definition name must be unique among all task files and cannot begin with a digit.

    • Identifiers in Java cannot include characters other than letters, numbers, the underscore (_), and the dollar sign ($). If you intend to generate Java beans from your task definitions, be sure to follow these naming conventions when naming your task definitions because your Java bean names will be based on your task definition names.

    • Do not include a file name extension when naming your task file.

    By default, your task definition name is based on the name of the IMS program alias it uses. If the task file name you specify already exists, your task definition is appended to the existing file; if the task file does not already exist, it is created.

  15. Add an optional description, and then click Save.

    Your task file, Task_file_name.xml, is displayed in Existing Task Definitions table, and saved, together with an input XML template file named in the following location:


    For more information, see Using Input XML Template Files.

Related Topics
Bullet Task Builder for IMS Help Links
Bullet About COBOL Copybooks
Bullet Creating an IMS Program Alias
Bullet Properties of Input and Output Fields
Bullet Generating Task Interface Objects
Bullet Using Input XML Template Files