Rational Developer for System z

Step 2.3: Create two screen descriptions for the Inquire Catalog application screen

In this step you will create a screen description for each of two states of the Inquire Catalog application screen.
There are two states of the Inquire Catalog application screen that you want the recorded flow to be able to recognize:

As you might suppose, the reason for requiring these two states to be recognized is to enable the recorded flow -- more specifically, a While loop within the recorded flow -- to page successfully through the list of items displayed in the Inquire Catalog screen (see Step 3.3: Add logic to the invoked flow). When the While loop pages forward through the list, then for each page of the list:

Because the two screen descriptions represent two states of the same application screen, they will be created in the same screen message file, Dfh0xs2.Exinqc.sfmxsd.

Create the two screen descriptions

To create the two screen descriptions for the Inquire Catalog application screen:

  1. Open the screen message Dfh0xs2.Exinqc.sfmxsd in the screen message editor:

    1. In the EST Project Explorer, right-click CatalogSample > CatalogSample.Terminal > Messages > Dfh0xs2.Exinqc.sfmxsd.

    2. Click Open With > Screen Message Editor. The screen message editor opens.

  2. Click the Screen Descriptions tab at the bottom of the editor area.

  3. Create the screen description for the "normal" state of the application screen:

    1. In the left pane of the Screen Descriptions tab, expand Descriptions > Exinqc.

      Note: Exinqc is the name of a screen description that you generated from a BMS map in Step 2.2.
      • As you can see, this screen description contains two descriptors:
        • Fields:85 This is a Number of Fields descriptor that asserts that the Inquire Catalog application screen contains 85 fields in all.
        • Input Fields:15 This is a Number of Input Fields descriptor that asserts that the Inquire Catalog application screen contains 15 input fields.
      • Notice that this rather generic screen description matches the Inquire Catalog application screen whether or not the application screen is displaying the last page of the list. In either case, the application screen being displayed has 85 fields in all and 15 input fields.
      • In this part of the tutorial, you want to modify this screen description to match any page of the list except the last page.
    2. In the left pane of the Screen Descriptions tab, right-click Exinqc.

    3. Click Add Descriptor > Add Field Pattern Descriptor.
      • In the left pane, the screen message editor has added to the existing list of descriptors a Pattern entry representing the new Field Pattern descriptor: Pattern:CICS EXAM....
        • A Field Pattern descriptor matches an application screen if the contents of the field specified in the descriptor match the contents of the same field in the application screen.
        • By default, a new Field Pattern descriptor is set to specify the first field in the application screen.
      • In the right pane, the screen message editor displays an image of the Inquire Catalog application screen.
        • Notice that field specified in the Field Pattern descriptor (that is, the first field) is highlighted with a red rectangle in the right pane.

    4. In the right pane, drag the red rectangle so that it highlights the field that encompasses line 23 of the screen image.
      • Line 23 is the blank line immediately above the line near the bottom of the screen that begins F3=EXIT.
      • This field occupies almost all of line 23 and is filled with blanks.

      In the left pane, the Field Pattern descriptor now specifies the contents of the field that you selected: Pattern: ...

    5. Save your work (Ctrl-S).

      The Exinqc screen description will now match the Inquire Catalog application screen only when the field occupying line 23 of the application screen is filled with blanks.

  4. Create the screen description for the "exceptional" state of the application screen. Here is an overview of this step:
    • First you will generate a new screen description, named EndPage, that is a copy of the existing screen description, which is named Exinqc.
    • You will then modify EndPage so that it matches the "exceptional" state of the application screen.

    1. Generate a new screen description, named EndPage, that is a copy of the existing screen description Exinqc:
      1. In the left pane of the Screen Descriptions tab:
        1. Right-click Descriptions.
        2. Click Add New Description.
        The Add Recognition Profile window opens.
      2. In the Add Recognition Profile window:
        1. In the Identify as input field, type the name EndPage.
        2. In the Copy from list, expand the list and select Exinqc.
          Note: This feature is very convenient when you are creating a screen description for a different state of the same application screen, because it allows you to initialize a new screen description from a copy of an existing screen description.
        3. Click OK.

        The screen message editor creates the new screen description and adds it to the description tree.

    2. Modify EndPage so that it matches the "exceptional" state of the application screen:

      1. In the left pane of the Screen Descriptions tab, expand EndPage.

      2. Click the field pattern descriptor Pattern: ....

      3. Now find the Properties view.
        • The Properties view displays the properties of the currently selected descriptor.
        • In its default position, the Properties view is located below the editor area.
        Note: If the Properties view is not visible, then follow these steps:
        1. On the workbench's main menu, click Window > Reset Perspective.
        2. Click OK when prompted.
      4. In the Properties view:
        1. Click the Pattern property. The entry in the Value column becomes an input field.
          Note: This property specifies the text characters that the field of the application screen must contain for the description to be true.
        2. In the input field, type the text END OF DATA and then press the Enter key. (There should be only 1 blank space after the word END, only 1 blank space after the word OF, and no blank space after the word DATA.)
          Note:
          • In the previous step, when you selected the Pattern property initially, you probably noticed that the highlighted part of the input field contained some number of blanks (79 blanks, in fact, because the corresponding field in the application screen has a length of 79).
          • However, you do not want to leave any trailing blanks after the phrase END OF DATA in your input field (trailing blanks are unnecessary here and may cause you confusion later on). The simplest way to avoid leaving trailing blanks is as follows:
            1. Click the Pattern property, if you have not already done so. The entry in the Value column becomes an input field containing 79 blanks.
            2. Press the Backspace key. (Not the Home key, and not the left arrow key).
              • The Backspace key erases the current contents of the field, including all 79 blanks.
              • The cursor jumps to the first (that is, the leftmost) character position in the input field.
            3. Now type the text END OF DATA in the input field and then press the Enter key.
            4. Click the Pattern property again. In the input field, you should see only the characters END OF DATA highlighted, with no trailing blanks.
          Note: Notice that in the editor area the EndPage descriptor now displays the pattern END OF DATA.

    3. Save your work (Ctrl-S).

      Note: The EndPage screen description will now match the Inquire Catalog application screen only when the field on line 23 of the application screen contains the pattern END OF DATA.
  5. Close the screen message editor.


Feedback