Rational Developer for System z

C. Record the flow information

In this topic you will record application screens, create a loop to handle the multiple pages of the Inquire Catalog application screen, add Extract actions to extract the data, and end the flow recording.
Note: The loop recording that you create in this topic is an example of a recording of a multipage list. The interior of the loop is a single application screen that displays one page of a multipage list (see Recording a multipage list as a loop).

To record the flow information:

  1. Verify that flow recording is in progress and that the CICS® example catalog application is displaying the Main Menu screen:
    1. Verify that the Stop Flow Recording icon Stop Flow Recording is displayed on the host editor toolbar. This indicates that flow recording is in progress.
    2. Verify that the title line of the application screen reads: CICS EXAMPLE CATALOG OPERATION - Main Menu.
  2. On the Main Menu application screen, in the Action input field, type 1 and press the Enter key. The Inquire Catalog application screen is displayed.

  3. Steps 4 through 10 describe how to record the application screens in the multipage catalog as a loop. Table 1 provides an overview of the actions you will take in these steps:

    Table 1. Overview of recording the catalog as a list
    Application screen displayed: Recognized screen description: Actions to take:
    The Inquire Catalog screen, showing the first page of available items. Dfh0xs2.Exinqc_Exinqc
    1. Click Begin Loop Begin Loop.
    2. Do an Extract Data from Screen The Extract Data from Screen icon for every item number in the first column.
    3. Press F8.
    The Inquire Catalog screen, showing the second page of available items. Dfh0xs2.Exinqc_Exinqc
    1. Click End Loop End Loop.
    2. Press F8 repeatedly until you reach the END OF DATA screen.
    The Inquire Catalog screen, showing the last page of available items, and with the text END OF DATA on line 23. Dfh0xs2.Exinqc_EndPage
    1. Click Exit Loop icon Exit Loop.
    2. In the Exit Flow Loop window, select Dfh0xs2.Exinqc_Exinqc and then press OK.
  4. On the host editor's toolbar, click Begin Loop Begin Loop to indicate that this screen is the first application screen of the first iteration of a loop (see Controls for recording a loop).

    The icon changes to End Loop End Loop to remind you that you have now entered the stage of loop recording in which you are seeking to navigate all the way through one iteration of the loop and back to the Begin Loop application screen.

  5. Create Extract actions to extract the item numbers from the fields in the Item column of the currently displayed application screen. This is the column at the left side of the screen with contents 0010 on the first row, 0020 on the second row, and so on. (The currently displayed application screen is still the first page of the Inquire Catalog application screen.)
    Note: You will need to create the Extract actions only once. The Extract actions that you create for the first page of the Inquire Catalog application screen can be reused for all the other pages of the Inquire Catalog application screen, because the field names and field locations in the Item column remain the same from page to page.
    1. Create the Extract action for the first field in the Item column (the field containing 0010):
      1. Click Extract Data from Screen The Extract Data from Screen icon.
      2. The Select Variable window opens, prompting you to select a variable to hold the text from the Extract action.
        • The Select Variable window displays all the variables in the variable message v_CheckItemAvailability that could be used for an Extract action.
        • So far the only such variable is variable0, which is the loop variable for the While loop. This loop variable was created automatically when you selected Begin Loop. The variable was created automatically because you selected the check box Do not prompt for variables when generating variable mapping in the Preferences (see A. Prepare for the flow recording).
          Note: Why then does the Select Variable window open here to prompt you to select a variable for the Extract action? If a loop is in progress, as it is here, then the Select Variable window opens even if the check box Do not prompt for variables when generating variable mapping was selected.
      3. In the Select Variable window create variables for all the Extract actions that are needed for this application screen:
        1. At the moment you need only one Extract variable for the current Extract action. However, it is easier to create the Extract variables for all the Extract actions needed for this application screen at once.
        2. To create the first Extract variable:
          1. Click Add new variable. The Add New Variable window opens.
          2. Type INQ1-ITEMREF.
          3. Click OK.
        3. The Select Variable window should still be open. Now create variables for the remaining Extract actions needed for this application screen, following the same steps as before. There are 15 Extract variables in all, but these are the only Extract actions that you must create for this tutorial. Table 2 shows the names of all the Extract variables:
          Table 2. Extract variables
          Name of the Extract variable:
          INQ1-ITEMREF
          INQ2-ITEMREF
          INQ3-ITEMREF
          INQ4-ITEMREF
          INQ5-ITEMREF
          INQ6-ITEMREF
          INQ7-ITEMREF
          INQ8-ITEMREF
          INQ9-ITEMREF
          INQ10-ITEMREF
          INQ11-ITEMREF
          INQ12-ITEMREF
          INQ13-ITEMREF
          INQ14-ITEMREF
          INQ15-ITEMREF
      4. Now that you have created all the Extract variables, it is time to select the variable for the first Extract action. In the Select Variable window:
        1. Click INQ1-ITEMREF.
        2. Clear the check box Extract data every iteration of this loop.
          Important: You must clear this check box for the tutorial to work correctly.
        3. Clear the check box Extract data into variable.
        4. Click OK.
      5. You are still working on the first Extract action. Now it is time to select the field to be read by the first Extract action. Move the mouse pointer to the first item number in the column. The characters in the field are surrounded with red square brackets ( [ ] ). For example, in Figure 1 the field containing the characters "0010" is surrounded with red square brackets, like this: [0010 ].
        Figure 1. CICS Example Catalog Application
        Red brackets enclose the first item number in the Item column
      6. Now click the field that is surrounded by the red square brackets. The host editor performs the following actions:
        1. It anchors the red brackets to mark the selected field.
        2. It creates an Extract action to read the contents of the selected field.
        3. It sets INQ1-ITEMREF as the variable for the Extract action.
        Note: Creating an Extract action does not save the current contents of the field (0010, 0020, and so on. Rather, creating an Extract action saves the location of the field, so that at runtime the Extract action can read the contents of the field, whatever they may be.
        Note: If you make a mistake (that is, you select the wrong field) then you can fix the problem with relative ease, so long as you fix it before you navigate away from this application screen (see I extracted the wrong field when I created an Extract action. How do I quickly fix this problem without having to start the flow record process over? , Method 1).
    2. Repeat the steps above to create the remaining fourteen Extract actions for this screen (use variable INQ2-ITEMREF for the field containing 0020, variable INQ3-ITEMREF for the field containing 0030, and so on). For each Extract action:
      1. Click Extract Data from Screen The Extract Data from Screen icon. The Select Variable window opens.
      2. In the Select Variable window:
        1. Select the Extract variable that you want to use (see Table 2).
        2. Clear the check box Extract data every iteration of this loop.
        3. Clear the check box Extract data into variable.
        4. Click OK.
      3. In the session area click the field that you want the Extract action to read text from. The red square brackets should be anchored to the field that you select.
  6. Press F8 to navigate to the next application screen.

    The application screen changes to show the second page of the list of items.

    In this stage of the loop recording you are seeking to navigate all the way through one iteration of the loop and back to the Begin Loop application screen:

    • In this recorded loop a single iteration consists of only one application screen (see Recording a multipage list as a loop). Therefore by pressing F8 once in this step you have navigated entirely through one iteration of the loop and have now returned to the Begin Loop application screen.

    • You might have noticed that although some of the content of the application screen changed when you pressed F8 above (the next sequential items in the list are now displayed) nevertheless the application screen is still recognized as Dfh0xs2.Exinq_Exinqc in the information area.

    • Because you navigated away from Begin Loop screen (by pressing F8) and you have now returned to the Begin Loop screen, you have completed one iteration of the loop.

  7. On the host editor's toolbar, click End Loop End Loop to indicate that you have completed one iteration of the loop and have arrived back at the Begin Loop screen.

    The host editor does the following:
    • It displays the Exit Loop icon Exit Loop to indicate that the next task is to identify the Exit Loop screen (see Controls for recording a loop).
    • It disables the Stop Flow Recording Stop Flow Recording icon to indicate that flow recording is temporarily suspended (see Recording the loop).
  8. Press F8 to page forward through the application screens that sequentially show all the available items in the list. Keep pressing F8 (one or two presses might be enough) until the text END OF DATA appears on line 23 of the session area.

    The recognized screen description is Dfh0xs2.Exinqc_EndPage.

  9. On the host editor's toolbar click Exit Loop Exit Loop to indicate that the current application screen (Dfh0xs2.Exinqc_EndPage) is the Exit Loop screen. The Exit Loop screen is the first application screen that occurs after the loop has ended (see Controls for recording a loop).

    The Exit Flow Loop window opens.

  10. In the Exit Flow Loop window:
    1. The upper pane lists the names of the screen descriptions (these are also the names of the corresponding Invoke screen operation nodes) that the loop can exit from.
    2. Select the check box beside Dfh0xs2.Exinqc_Exinqc. By selecting this check box you identify this application screen as a valid exit-from screen for the recorded loop (see Exit-from screens).
    3. Click OK.
    The recording of the loop is now completed:
    • The currently recognized application screen is still the Exit Loop screen (Dfh0xs2.Exinqc_EndPage).
    • The host editor performs the following actions:
      • It replaces the Exit Loop icon Exit Loop with the Begin Loop icon Begin Loop, thus indicating that the loop recording is completed.
      • It reenables the Stop Flow Recording icon Stop Flow Recording, indicating that flow recording is still in progress.
  11. Press F12. The CICS example catalog application returns to the Main Menu screen.

  12. On the host editor toolbar, click the Stop Flow Recording icon Stop Flow Recording to terminate flow recording. Flow recording ends.

  13. On the host editor toolbar, click the Save Flow icon Save Flow. The host editor saves the flow.

    Note: The new flow, CheckItemAvailabilty.seqflow, is added to the Flows folder.
  14. Log off and close the host editor.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)