Rational Developer for System z

Part 3. Record the sample flow with the host editor

In this part of the tutorial, you will use the host editor to record the sample flow.
When a flow is recorded in the host editor, the host editor performs the following actions automatically:

See Recording a flow for more information on flow recording.

To record a flow in the host editor:

  1. Set two recording preferences:

    1. On the main menu of the workbench, click Window > Preferences.

    2. In the Preferences window:
      1. In the left pane, select Enterprise Service Tools > Service Flow Projects.
      2. In the right pane, select the check boxes Automatically capture new screens and Do not prompt for name when automatically capturing screens if they are not already selected:
        The preference Automatically capture new screens causes the host editor to capture each screen after you start recording a flow. The preference Do not prompt for name when automatically capturing screens causes the host editor to assign a name to each screen instead of prompting you for the name.
        Note: If you also select the check box Do not prompt for variables when generating variable mapping, the host editor automatically provides a name for any variables that you create for Insert actions, Extract actions, and recorded loops. In these tutorial instructions, the check box is not selected.
      3. Click OK to close the Preferences window.

  2. Because of the way in which the service flow project was created in Part 1 of this tutorial, the host editor should now already be open in the editor view. If not, open the host editor as follows:

    1. In the EST Project Explorer, open SampleProject > SampleProject.Terminal > Hosts > SampleHost.host.

    2. The host editor opens and attempts to connect with the host, using the information specified in the host connection file.

  3. Navigate to the CICS® clear screen. If you are unsure of how to navigate to the CICS clear screen, ask your host systems administrator.

  4. Verify that the host editor is in flow mode: The first icon on the host editor toolbar should be Go to Screen Operations Mode (not Go to Flow Mode).

  5. On the host editor toolbar, click the Start Recording Flow icon Start Recording Flow to start recording.

  6. The New Flow Recording wizard opens. On the first and only page of this wizard:
    1. In the Flow input field, type the name of the flow, SampleProject.

    2. In the Interface Resources group:
      1. Click Create all new resources if it is not already selected.
      2. The wizard provides default names for the resources:

    3. Check the check box Automatically expose insert and extract variables in the interface operation messages if it is not already checked.

    4. Click Finish.

    The icon changes to the Stop Recording Flow icon Stop Recording Flow. Recording is now active.

  7. Enter the 4-character transaction ID of the CICS IVP Menu application (this tutorial uses amnu: your transaction ID may differ) and press Enter. The Operator Instructions menu appears as shown in Figure 1:

    Figure 1. Operator Instructions menu
    Operator Instructions menu

  8. In the input field following the words ENTER TRANSACTION: type the account inquiry transaction ID (this tutorial uses ainq).

  9. For the input field following the word NUMBER, create an Insert action as follows:

    1. On the host editor toolbar, click the Insert Data into Screen icon Insert Data into Screen. The Select Variable window opens.

    2. Select a variable to use with the Insert action:
      1. In the Select Variable window, the list of variables is blank because no variables have been created yet (see The variable message of a flow):
      2. Click Add new variable. The Add New Variable window opens:
        1. In the Variable Name field, type AccountNumber.
        2. Click OK to close the window.
      3. In the Select Variable window:
        1. Select the new variable AccountNumber.
        2. Click OK to close the window.
    3. Select a field to use with the Insert action. This is the field into which you want the Insert action to write text:
      1. On the CICS application screen, move the mouse pointer icon to the input field immediately following the word NUMBER. A red underline with the ends turned up highlights this input field.
      2. Click the input field.

    4. You have now completed creating the Insert action. When the Insert action is performed, the contents of the variable AccountNumber will be written into the field that you selected.

    Note: All variables are defined in the v_SampleProject.sfmxsd file.
  10. In the CICS application screen, in the input field following the word NUMBER, enter a valid customer account number (such as 100) and press Enter. The application displays the File Inquiry screen as shown in Figure 2:
    Figure 2. File Inquiry screen
    File Inquiry

  11. In the File Inquiry screen, create an Extract action to read text from the application screen:

    1. On the host editor toolbar, click the Extract Data from Screen icon Extract Data from Screen.The Select Variable window opens.
    2. Select a variable to use with the Extract action:
      1. In the Select Variable window:
        1. Click Add new variable. The Add New Variable window opens.
        2. In the Add New Variable window:
          1. In the Variable Name field, type ciName.
          2. Click OK to close the Variable Name window.
        3. In the Select Variable window, select ciName
        4. Click OK.
    3. Select a field to use with the Extract action. This is the field from which you want the Extract action to extract text:
      1. In the CICS application screen, move the mouse pointer to the field immediately to the right of the word NAME:. Red square brackets appear surrounding the input field.
      2. Click the field.

    4. You have now completed creating the Extract action. When the Extract action is performed, the contents of the field that you selected will be read into the variable ciName.
  12. Repeat steps a - j for each subsequent line of information on the CICS application screen. Use the following names for the remaining variables:
    • ciAddress
    • ciPhone
    • ciDate
    • ciAmount
    • ciComment
    Note: Do not use a variable name that is a COBOL reserved word, such as Address or Date.
  13. Finish the recording. In the CICS application screen:
    1. Press Enter. The Operator Instructions screen appears again.
    2. Press Escape to terminate the transaction.
    3. Type cesf logoff to log off.
    4. Click the Stop Recording Flow icon Stop Recording Flow to stop the recording.

  14. Recording is completed.

  15. Click the Save Flow icon Save Flow to save the flow that you have just created.

If you like you can open the new flow in the flow editor to see the nodes that were created by the flow recording. In the EST Project Explorer, click SampleProject > Flows > SampleProject.seqflow. Although these actions are not covered in this tutorial, you can use the flow editor to add nodes or subflows, change node names, and so on. You can also populate empty flows in the flow editor.

The following outline describes the new files created in this step:


Feedback