Creating a Task Definition

Each task definition references a host program definition (HPD) 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 HPD 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 HPD 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 host program definition. For more information, see Creating a Host Program Definition.
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. From the Host Program Definitions table, select the host program definition on which to base this task definition, and then click Next.

  4. Select the fields from the Input COMMAREA to use as inputs in this task, and then click Add to add them under Input Fields.

    -or-

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

    Child nodes are automatically included with parent nodes.

  5. (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.
  6. When you have finished adding input fields, click Next.

  7. Select the fields from the Output COMMAREA to use as outputs in this task, and then add them under Output Fields.

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

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

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

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

    If, in your host program definition, you specified a single COMMAREA for both inputs and outputs, the preceding steps are combined for inputs and outputs.

  13. Name your task definition and a task file in which to save it.
    Note
    • 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 host program definition 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.

  14. 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 Task_file_name.in in the following location:

    install_directory\EAI\CICSTaskDesigner\MetaData

    For more information, see Using Input XML Template Files.

Related Topics
Bullet Task Builder for CICS Help Links
Bullet About COBOL Copybooks
Bullet Creating a Host Program Definition
Bullet Properties of Input and Output Fields
Bullet Generating Task Interface Objects
Bullet Using Input XML Template Files
  Attachmate